Warlock Pet Frame Troubles

Hey there, I've decided to pick up warlock as an alt again this season and I noticed a few issues while leveling.

I've played melee classes since TBC so I've long been used to a unit frame layout similar to neilyo, khuna etc. This has obviously required me to move my pet frame and I've had no problem doing so on other classes such as mage, but when I do so on my lock the frame bugs out. My pet frame is automatically moving to its default position under the player frame but for me this covers my target frame and debuffs. Something triggers this during combat and I'm pretty sure its when I generate a soul shard, it doesn't matter where I place the frame and I've tried doing so with MoveAnything and the macro provided in the default UI scripts sticky.

Does anyone have an idea how I can get around this? I've been lvling with GoSac for now to ignore the problem but I'm nearing 90. I can post screenshots later if needed.

I don't directly use that at the moment (knowingly) but I have moved the pet frame with MoveAnything. I didn't get around to trying the code that you gave me at first. I've also tried moving the frame with the macro to make the frame draggable but that didn't work either and the frame would move in combat when something happened with soul shards.

I don't directly use that at the moment (knowingly) but I have moved the pet frame with MoveAnything. I didn't get around to trying the code that you gave me at first. I've also tried moving the frame with the macro to make the frame draggable but that didn't work either and the frame would move in combat when something happened with soul shards.

use this Macro for the pet movement: (replace X and Y with coordinates of your choice)

Ah I see, I didn't understand the purpose of the second line you gave me in the script. I'll try it in addon form and see if it would work fine, would reloading cause it to unlock even if I used the script rather than the macros?

Would you mind providing the entire script I would need for the addon to work properly?

The coordinates I need are -423, 7.

I can get this to work in a macro, but I want it to load whenever I log in so I attempted to make an addon for the first time. I can get the addon to show in the addons menu but it wont move the frame as intended.