Sounds like you're panicking and tensing up, causing you to sink. Maybe try practice floating so you know you won't sink even if you don't even do anything.
I can front float pretty well because it is the way I get into my head underwater breaststroke variation but it is no use with the head above water or the water treading thing