Halyard hitches are jamming knots. They are suited to situations where they are left attached permanently ( such as to a shackle which is then used to clip on/off a sail). They are not a good solution where you want to frequently untie/retie the line.
How often do you expect to be removing the
mainsail ?
As Nigel1 says, the advantage of the Halyard hitch is that you can snug it in close.
Not sure if it is applicable from your description (outhaul line attached to the traveller by a hitch), but you may like to consider switching to a soft shackle between clew and traveller.