I'm not saying this is a good idea but a captain I know did this all the time and it worked fine.
Loosen the main halyard so you have a few feet slack.
Flip the halyard so instead of going from the head of the sail straight up to the shive at the top of the mast it goes around the forward side of the spreader.
Bring the halyard from the head of the sail around something on the mast like the winch if you have one.
Lightly tighten the halyard.
It only takes a second to clear (usually) and the halyard will not clang.
The disadvantage is that it is easy to forget that the halyard is purposely fouled.