Setting RootPart's CFrame is different when in shift lock?

"I tried setting the RootPart’s CFrame to match another part’s CFrame in my Roblox game, which worked completely fine so far. However, I discovered that when attempting to set its CFrame in shift lock mode, the RootPart is always rotated 90 degrees to the left for some reason.

Rotating the CFrame back 90 degrees seems a bit hacky. Are there any other ways I could fix this?