Code:
TargetFrameToT.SetPoint = function() end
This is your problem. Overwriting anything on a secure frame will taint the entire frame. You're doing this with several other members on several other frames, as well.
Instead, you should securehook the SetPoint method, and move the frame back to the desired location if out of combat, or queue the move for the end of combat if you're in combat. I'm not familiar with the internal workings of the Blizzard unitframes, as I haven't used them in 6+ years, but they are (hopefully) not calling SetPoint in an OnUpdate or something stupid.