I’m using an app to use my Android phone as a webcam, which works great (good low light performance!) provided I can stand it up somewhere above my laptop screen (finicky). You can accidentally knock it over. Might be worth considering if you don’t use the camera much - otherwise an external one will probably attach better and he more stable
I don’t think I have enough knowledge to solve this or say anything for certain, but I wonder if the power button is treated as an external keyboard and is getting ignored in tablet mode?