Repository: godot
Issue: AnimatedSprite2Ds inside Inherited Scenes end up with (empty) frames in editor
Labels: bug,topic:editor,topic:animation,topic:2d

### Godot version

3.3.stable and 3.4.2

### System information

Linux, GLES3, AMD  + Mac 10.13.6, GLES3, AMD

### Issue description

Hello,

I am on Linux working with a designer on Mac, and our project is using git, after pushing changes to scenes to each other, sometimes the frames will show as (empty) in the editor after the other person pulls them, like this:

![gold-missing-frames](https://user-images.githubusercontent.com/13953/148148457-9a1e6d41-44ed-41bf-9838-d063fa38c2e2.png)

You can see the images exist on the left, but the frames are now (empty) like they are missing.  This is how the relevant part of the Gold.tscn file looks, which as best I can tell looks correct:
```
[gd_scene load_steps=24 format=2]

[ext_resource path="res://Items/Gold.gd" type="Script" id=1]
[ext_resource path="res://Items/Gold/frames/idle/0001.png" type="Texture" id=2]
[ext_resource path="res://Items/Gold/frames/idle/0002.png" type="Texture" id=3]
[ext_resource path="res://Items/Gold/frames/idle/0003.png" type="Texture" id=4]
[ext_resource path="res://Items/Gold/frames/idle/0004.png" type="Texture" id=5]
[ext_resource path="res://Items/Gold/frames/drop/0001.png" type="Texture" id=6]
[ext_resource path="res://Items/Gold/frames/drop/0002.png" type="Texture" id=7]
[ext_resource path="res://Items/Gold/frames/drop/0003.png" type="Texture" id=8]
[ext_resource path="res://Items/Gold/frames/drop/0004.png" type="Texture" id=9]
[ext_resource path="res://Items/Gold/frames/drop/0005.png" type="Texture" id=10]
[ext_resource path="res://Items/Gold/frames/drop/0006.png" type="Texture" id=11]
[ext_resource path="res://Items/Gold/frames/drop/0007.png" type="Texture" id=12]
[ext_resource path="res://Items/Gold/frames/drop/0008.png" type="Texture" id=13]
[ext_resource path="res://Items/Gold/frames/drop/0009.png" type="Texture" id=14]
[ext_resource path="res://Items/Gold/frames/drop/0010.png" type="Texture" id=15]
[ext_resource path="res://Items/Gold/frames/drop/0011.png" type="Texture" id=16]
[ext_resource path="res://Items/Gold/frames/drop/0012.png" type="Texture" id=17]
[ext_resource path="res://Items/Line2D.gd" type="Script" id=18]
[ext_resource path="res://Items/Gold/frames/idle/shadow.png" type="Texture" id=19]

[sub_resource type="SpriteFrames" id=3]
animations = [ {
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "idle",
"speed": 8.0
}, {
"frames": [ ExtResource( 2 ), ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ],
"loop": true,
"name": "drop",
"speed": 18.0
}, {
"frames": [ ExtResource( 6 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 9 ), ExtResource( 10 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 13 ), ExtResource( 14 ), ExtResource( 15 ), ExtResource( 16 ), ExtResource( 17 ), ExtResource( 6 ) ],
"loop": true,
"name": "drop2",
"speed": 18.0
} ]
```

I recently did a fresh install of Fedora on my desktop, and git cloned my repo, and noticed **every** inherited scene that had an animatedsprite2d was showing frames (empty) like this.  I use inherited scenes for almost everything, so literally hundreds of animatedsprite2ds have (empty) frames in the editor now - however if I run the game they still work and show up.  But, if I make other changes to a scene, godot then saves all these (empty) frames to null frames in the tscn, and then they become actually blank when running the game.

### Steps to reproduce

Unfortunately I'm not sure exactly what is causing it, I tried making a test project with an AI.tscn, then an Inherited Scene Enemy.tscn and put some frames there, and tried moving it around, renaming it, opening it as a new project, changing the scenes, and it kept the frames.

On my game I tried nuking .import folder and files, I also tried going back to old branches and git tags, and they are still (empty) after, so I'm not sure what causes it to go into this state once its there.  Maybe it is something to do with different file formats between Mac and Linux?  As we are pushing changes back and forth to each other, and sometimes the frames go (empty) on us, usually on the Mac.  But it only occurs on Inherited Scenes.

**Update:** actually managed to resolve this for my game by renaming the project folder, then all the images just worked again.  Still no idea what may have caused it, or why that fixed it though.

### Minimal reproduction project

_No response_