Terry3111,
Thank you for clarifying that for us. Do you have any restrictions turned on? You can go to Settings > Screen Time > Content & Privacy Restrictions, scroll to the bottom to the section titled "Allow Changes" and be sure that the "Passcode Changes" restriction is set to Allow.
Use parental controls on your child's iPhone, iPad, and iPod touch
If that setting is off or this continues to occur after turning it off, you may want to backup your data, restore your iPad, set it up as new, and test to see if this continues to happen.
How to back up your iPhone, iPad, and iPod touch
Restore your iPhone, iPad, or iPod to factory settings
If this continues after setting up as new, you may want to reach out to Apple Support for further assistance. Depending on your region, you may be able to reach them here: Get Support.
Good Luck!