Something weird seems to have happened lately with Ubuntu 26.04 and BIOS 3.09. The tablet mode with popup keyboard only works when the display is fully flat against the back of the computer, whereas before you could fold it most of the way and it would activate.
Then when in tablet mode the auto rotate doesn’t work. All was fine before.
Also flipping the screen back to laptop format doesn’t return to KB/mouse mode.
I had a similar behaviour shortly after replacing my (cracked) bottom and top cover. I did not have your keyboard behaviour, but the tablet switching issues and in my case the laptop did not go to sleep mode when fully closed.
It turned out that I had to tighten the hinge screws a bit more… now everything works again.