Go into the sprite and click the crop button - it has a 1px transparent border
Sorry for the late reply but I ignored the problem for the time being and recently came back to it.
I cropped out the 1px transparent border but it didn't seem to change anything. It shouldn't have anyway considering the collision box was only on the white border of the square object (the player).
This gap problem still happens only when I enable physics for the player. When its disabled with only "platformer" behaviour there is no visible gap. The gap disappears when the character is in motion but comes back when its still. This makes the character have a bobbing motion when it goes and stops.
Any advice?