Thank you for posting this, it helped! :)
I bought a Google Pixel 10 Pro, from a legit shop, unlocked, phone connected to the internet etc. I got to developer mode and the "OEM unlocking" option was greyed out, not clickable.
So I did factory reset as suggested, and it magically worked! I am able to toggle it!
One thing to note, maybe not related, but the first time I turned on the phone I skipped all steps and added a temporary google account only later. The second time, after the factory reset, I followed all the setup steps adding the google account right away (no sim).