I've just had the same issue today on my pixel 9a. I'm sure I entered the correct PIN as, I'm ashamed to admit, it was the same for all 4 profiles I had and it worked fine for one profile but failed in the owner and another of my profiles.
Not sure if it plays a role but most of my profiles had a scrambled keyboard for entering the PIN.
Additionally, today was the first time I connected to my laptop using USB cable to transfer files and I don't quite remember but I may have switched profiles while connected to the laptop and I surely removed the USB cable without "dismounting" the device on my laptop nor without disabling USB data transfer on the phone.