A couple ideas. You need to figure out if it is the pump, heater, or wiring.
Is something is getting wet in the heater, pump, or wiring. Does the GFCI trip without anything running? I.E. With just power applied to the motor and heater?
Turn off power. Disconnect the heater. Safe off the wires. Turn on power. Run the pump. Does it still trip? You can simulate rain with a hose. Don’t over do it with the “rain”. If the pump runs fine, then it is the heater. If it still trips, it is the pump or wire.
Check the wiring to the heater. You may need an electrician if you do not have an insulation testing meter. Basically, with the wiring disconnected from the heater, you will connect a lead to one hot wire and the ground. The tester will apply 500V to the wire. You are looking for a high reading here. Repeat for the 2nd wire. Then, with breaker open, check hot to hot. If wires check out okay, it is an issue with the heater.
Turn off power. Look for wetted electrical components inside the heater. Start with where the wires enter the heater. Then check the motor for any wetted components.