Repository: godot
Issue: Godot crashes and corrupts StateMachine EditorProperty in all the AnimatorTrees
Labels: bug,topic:editor,crash,topic:animation

### Tested versions

- **Reproducible in:**
- v4.2.1.stable.mono.official [b09f793f5]
- v4.2.1.stable.official [b09f793f5]

### System information

Pop!_OS 22.04 LTS x86_64, (HP Envy m7 Notebook), intel i7-7500U 3.5GHz, Nvidia GeForce 940MX, 16GB RAM

### Issue description

This is an odd issue I encountered this morning. I have a Player scene that contains 3 Sprite2D nodes in it: Body, Head and Hat. Yesterday. Last night, I worked on turning Head and Hat into AnimatedSprite2D nodes, so my boy could blink and wear fancy stuff. While working first on the head, my program suffered plenty of crashes during the edition of the AnimationNodeBlendTree roots in my AnimationTrees, specifically the StateMachines only, when renaming them or when clicking any of the tabs inside a BlendSpace2D node in them to return, except the root one:

![image](https://github.com/godotengine/godot/assets/31547371/fc2cdb79-e3bb-425d-aece-6fc85d25f326)
![Godot help 2](https://github.com/godotengine/godot/assets/31547371/11b52619-f74e-4833-9026-15136354dc6d)

My Godot crashed about 8 times while doing one of those two things last night, however, I swear I managed to finish my task properly at 4AM, of making the character blink and rotate his hat all fine. Locked the laptop to turn its scren off and went to sleep. However, this morning, the error "EditorProperty is out of inspector" and others started appearing whenever I click any of my AnimatorTrees in my scene.

I did so many things before coming here to make sure it wasn't something I could fix, but this seems really weird; it only happens to AnimatorTrees that have a StateMachine in it (the only one I use at all, and a TimeScale, as shown below). It happens in brand new projects as well, not just new scenes or my Player's. It seems my entire Godot can't detect StateMachine nodes inside AnimatorTrees anymore and I don't know how to fix it yet.

I tried deleting the .godot folder, tried it on both Godots (C# is the one I currently use, but it doesn't work on both versions, brand new installs). I tried to debug with VS Code, but there were no relevant edited files. Made sure no BlendSpace2D animation was out of bounds, within the x, y coordinates; checked out the resource's path, removing them does nothing, they get readded back and they seem fine, they have a unique ID and everything...

I can run the game and play as before, however, the AnimatedSprite2D won't animate; editing their blend_positions and calling .travel() through code and all that works fine. I am really lost at what to do with this issue, it seems pretty wild, and I wish I had another computer at hand to see if it goes deeper than just Godot, not sure, maybe with a VM, I will see if I can find more to this. I blame those crashes from last night, is no coincidence they happened during my work on the StateMachines and nothing else. I had to Ctrl+s every 5 seconds and avoid using certain buttons while in them. Anyone know a fix or workaround to this? I'd appreciate so much

The other errors shown below are also related, but I feel like fixing one fixes the other, and both are still vague for me to find what's up. I am currently reading about the EditorProperty and the EditorInspector; I will update this if I manage to find something

Trying the MRP:
![Godot help](https://github.com/godotengine/godot/assets/31547371/7f4f7bd6-6fcf-4cdd-be91-aa079ef7108e)


### Steps to reproduce

1. Start a new project
2. New 2D scene
3. Add an AnimatorPlayerTree
4. Set "AnimationNodeBlendTree" as Tree Root
5. In the AnimationTree editor below, add a new node, "StateMachine"

The error "EditorProperty is outside inspector." now appears in Output whenever you click on the AnimatorTree node in the hierarchy, back and forth.

### Minimal reproduction project (MRP)

[MRP.zip](https://github.com/godotengine/godot/files/14317438/MRP.zip)