The first thing you should do is stop playing in that cramped sitting down semi-crosslegged position. It does nothing for your posture and hinders all of your accesses to the instrument in the most intrusive ways possible (short of trying to play standing on your head). Your left knee obstructs your left hand. The whole instrument is pushed to your right which blocks clear access to the higher positions - your body is getting in the way. There is no way in hell you can address the instrument freely from that position.
Secondly you need to get your fingers unfurled and out in front of the fingerboard.
It's not just your middle finger - all of them (except index) disappear under the fingerboard at some time or other:
View attachment 4555777
Finally, but probably most importantly, I would go back to basics with some fundamental technical exercises designed to promote and develop good hand-shape. This one uses just 3 left-hand fingers 1,2 & 4. Do it slowly and deliberately, keeping each finger in position on or above the fret in a gently curved relaxed posture.
View attachment 4555787
View attachment 4555922