KinematicBody2D behaves different on different window resolutions

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By wyy2

I use move_and_slide to move the player(KinematicBody2D). And it looks good, but when I maximize window, or if I make it smaller it behave different - the jump strength is smaller or bigger. The fps is the same in all window sizes - 60fps.

motion.y += GRAVITY
if(jump):
   motion.y = JUMP_HEIGHT
motion = move_and_slide(motion, UP)

This is how it looks:

Normal resolution:

Small window:

Maximized window:

Any ideas why this might be happening?