What GasHazard said^^^^
but also, it sounds more to me like a stance issue. Most wind foilers have experienced that "trapped" stance before at least once in their time foiling. You're leaning as far forward as you can, but you just keep rising on the foil till you know you're close to the top of the mast and you're just waiting for the foil out. It's almost always when you're heading off wind. I've done it plenty

Not ruling out the possibility that things need moving around, but that trapped stance is generally what causes the foil out. Your mind has told you that you've hit max forward stance and you're doing all you can to bring it back down. but you've actually just gotten so low and forward that you're now applying almost all your weight to your back foot, which sends you up. you are no longer in a position where you can shift the sails weight forward to bring yourself down and you've psychologically lost you're ability to apply front foot pressure, because your brain is telling you to stay in position.
99% of the time, there are actions you can take that will bring you back down, no matter how you are set up. Practice holding a position where you can get your weight on the front foot. I find keeping my back foot out board when off breeze helps quite a lot. It's more a case of training yourself out of falling into that forward position than anything else.