The Tilt Pen works for me on an HP Pavillion All-in-One 24-r0xx with the operating system Ubuntu 22.04.3 LTS and the application InkScape 1.2.2.
The Tilt Pen works when I use the lap top as a convertible, i.e. like a note pad, and fold the keyboard back. As a lap top with the keyboard and the screen open, the Tilt Pen also works. But it is tedious to hold the screen with the left hand and draw with the pen on the wobbling screen with the right hand.
I'm sorry, I can't offer a simple solution to your problem.