Scaling problems

When I develop my app the x axis coordinates get relocated normally but the y coordinates don’t get remapped so i get an offset on different resolutions how can i fix this?

And is there any way to get the real hardware resolution of a device not the preset that is defined in the config.lua using something similar to display.contentHeight ?