Thank you so much for actually giving me some tips to improve the code!
If you really want to avoid falling down to far you can repeatedly mash the "W" button which will hold your altitude - another oddity of the movement code I guess :D