I need some help

So, I got annoyed of having to put the pattern in. In settings, I went to turn of the password, but it told me to turn off face ID first. So, after I turn I face ID, I go to turn of the password. When i turned off the display and back on again, I tested if it was gone, and it gave the prompt for the password. I put in the password that I had set, but it didn’t work. I tried powering all the way off and back on again, but that didn’t work either. Is there a way to fix this? Because of the pattern prompt, I’m not able to do a factory reset.

You’ll have to flash the firmware.