If you hold W and D at the same time, your head won't go up as far. When you're making that first grab, you want to make sure your head is as high up as possible
This is me holding just W as I go toward the wall

This is me holding W and D

if you're holding the top you can clear it just by moving your other head over

This reply kind of got formatted weird but I hope you understand lol