Have HVAC Questions? Ask an HVAC Expert for Answers
Does heat pump work fine in cool mode?
OK it sounds like you have a sticking txv, metering device in the outdoor unit.
That means we are getting a restriction in heat mode because refrigerant cannot flow through and unit is shutting off on high head pressure.
If the issue were a broken wire or the solenoid on reversing valve was not switching, unit would still run, just blow cold air as if it were in cool mode.
This is going to require an onsite tech to replace unless you have a vacuum pump, recovery machine, refrigerant gauges and a welding rig.