I have a raspberry pi 3 b+ running Raspbian Bullseye with the raspberry pi official touch screen. The display is upside down. I've tried rotating with the Screen Configuration tool, but it doesn't change the touch inputs so they hit on the wrong side of the screen. I also tried editing the /boot/config.txt file. I added this to the end of the file:
lcd_rotate=2
When the pi booted, it started out correctly, but then switched back to being upside down. How can I rotate the screen and get the touch inputs working correctly?