Goes from cool to hot
That's a heat pump, so you'll have more than two wires. It's entirely possible that you've got a wiring mixup causing the reversing valve to activate/deactivate at times, which would cycle you between heat and cool.
There is a defrost control system in that unit, but I'm not sure if it's mechanical or electronic. If it's electronic then you could certainly have issues with it, which could cause the same issue.
Sounds like you need to find a tech who will troubleshoot the entire system, and not just swap stats.