This is what I am talking about. It doesn't seem to stay.. And just slips out
I loathe mechanical front derailleurs.
The latest shimano models have a system where the HOSE goes all the way to the derailleur. Older models used to be that the hose would stop in the frame because of the plastic thingy in the frame, and only the cable would go to the derailleur.
This isn't something that i've seen covered much in YT & here.
But that could explain your predicament: you may be using a plastic thingy that's meant to allow the hose to go all the way to the FD.
I would suggest you look at the prices of FD that connect the hose directly, because that's a superior design: better weather proofing, less faffing with the frame stopper, and should be mechanically superior.