Exporting Blender rotation issues with scripting and animation

Disclaimer: I have learned more about about the problem and realized the problem isn’t a scripting problem and seems more like a Blender exporting problem. As I just learned Animations and realized it even does it to animations.

Now, how would I fix this in Blender as to ensure I don’t do the same mistake in the future.

As you can see, the rotations don’t add up. When I manually rotate it, it works well. I am using pivots as well, so I figure it has something to do with that. Although, it worked find with my doors I made.

I did include videos since just showing you will describe my problem way more than me trying to type it out.

Here is a video of trying to open it through a script.

Here is a video of trying to animate it.

My Blender file.

Hello! I recommend fixing the door pivot right in the Unity Editor - using ProBuilder.
I recorded a short tutorial video on how to fix your model in your case:
https://youtu.be/QzLUxY2hVn4

Restricted video, access via link only. If you allow, I will make it public. Leave a comment about this, please.