Moving bathroom fan on GFCI outlet
Consider the switch and fan as a system.  Together, if we ignore the wires that interconnect them to each other, they are inputting 1 hot wire and 1 neutral wire.  Both those wires need to be attached to the LOAD side of one GFCI device.
That's it.
In your question, you are claiming that power comes to the switch first, then proceeds to the fan via an entirely separate /2 cable than is used by the light.  Obviously if those facts are untrue, then this advice is void.
Replace the fan switch with a  GFCI switch... and yer done.
A GFCI switch looks like a GFCI receptacle, but with no sockets.
The Test/Reset buttons are re-cast to be &quot;Off/On&quot; buttons.  This is UL approved.
Or... pull off that receptacle if that circuit serves ONLY this bathroom
The problem is recent NEC revisions have required bathroom receptacle circuits be dedicated to receptacles.  There's one exception for receptacle circuits which serve only one bathroom - those can be tapped for hardwired loads in the bathroom.
&quot;But my house should be 'grandfathered', since it was built prior to that rule&quot;.  Um, no... by that logic an 1865 house wouldn't need to follow any electrical codes at all.  What is the case is that work permitted under a particular Code revision only needs to comply with that Code revision.  However, if Code changes, new work such as this must comply with current Code at the time it is permitted.  In short, you can't make a grandfathered situation worse.  You can't add new hardwired loads onto a receptacle circuit that serves more than this one bathroom.