Assuming that both the iPad and keyboard are recently purchased, you perhaps need to consider that one or other may have a fault. Given that the issue relates to use of a third-party keyboard, the easiest diagnostic is to test the keyboard with a different compatible iPad.
Your best approach will be to visit your local Apple Store - where you will be able to test your iPad with display models. If the keyboard works as expected with a different iPad, then the issue lies with your iPad. If the iPad is suspected as being the issue, you’ll be able to seek help from the technicians at the Genius Bar - who can test and assess your iPad.
Genius Bar Reservation and Apple Support Options - Apple
Conversely, if the keyboard doesn’t work with a different iPad, then the keyboard is almost certainly at fault. Witjin warranty, you’ll need to seek replacement via the retailer from whom the keyboard was purchased - and/or you’ll need to seek assistance from Logitech Support. Having tested with different devices, you’ll be in a good position to describe the problem and your fault-finding to date.