You had air in the system.
Heater hoses are high spots, if there is any air in the system it will make its way to the high points, if there is enough air it will block the flow to heater core, so it goes cold.
Changing engine RPMs can push out the air block, so heater comes back.
When you refill a cooling system you should remove 1 heater hose at the firewall, this will let the air out as you refill the system, when coolant starts coming out of core and the hose, reconnect them, the little air that's left will be purged into overflow tank at the next heat up of the engine.
Make sure overflow tank is never dry, and its hose to rad is not leaking, if this system has air in it it will be sucked into the rad next time engine cools down.
It reads like your temp gauge or it's 1 wire sending unit is off, because it is cheap I would replace the sending unit, there will be two that look similar, the 1 wire unit is for the gauge.
The 2 wire unit is for the computer.
Never use sealing tape on a 1 wire sender, it's threads need good contact with the engine, these are ground/resistance senders.