After Screen Rotation, Touch Screen No Longer Aligns with Display Contents in Programming Code

I decided to install Qubes on a laptop and tablet that has a screen that can be rotated. It can be in Tablet mode or laptop mode.

When I started Qubes, the screen was oriented wrong and so I rotated the screen. Now the display is oriented correctly but the touch screen doesnt align with whats on the screen (in the programnming). If I press the upper right part of the screen, Qubes thinks I hit the lower left part of the screen and the cursor moves there. There is a logic to the errors: the mouse is not moving randomly and there is some geometric correspondence which I haven’t yet deduced. I need to somehow let dom0 know that the touchscreen hasn’t rotated but just the screen us, or that they both have.

How do I fix this?