Preface: I’m an iPhone user, but I’m kinda confused what you’re trying to achieve that can’t be had with just pressing the physical button the phone to turn off the screen. Does the screen need to be on for the alarm to work?
Pressing the physical button used to work, even with the current oddball settings. It only stopped being effective a few weeks ago, when using a wireless charging stand.
It still works when I switch back to USB charging. Presumably because it would be too easy to simply place the phone face down, effectively revealing user preference.
When enabled, it seems to have two options to either enable "when charging" or "when docked and charging". I wonder if your wireless charger is considered a dock and hence activates this different mode than you get for regular USB charging.
Pixel 6, US, I keep it up to date.