Temporarily turn off the relative rotation from parent in my script while keeping the relative position updated?

The title.
How can I turn off the relative rotation from parent in my script while keeping the relative position updated?

So you want to keep the exact same rotation for a child object, even when the parent rotates?