Sorry, no idea! My games always use a canvas with explicit width and height eg 320x180, and they have no choice but to line up right. I’m guessing your framework does something more complex.
width
height