Just don't delete the move on the main line if you don't want to lose the moves after it.
Bug [ ]: Analysis tab Annotation permits Delete Move on game score

Just don't delete the move on the main line if you don't want to lose the moves after it.
The point is you should not be able to delete game moves. Fixing the dropdown avoids the issue.
In addition one can't undo the an accidental Delete Move via Clear All Analysis as the moves are gone. Just don't permit it.

There are times when deleting a move at that level is wanted. I've had plenty of times when I have realized multiple moves later that I had a wrong move in.
As long as you don't save, you should be able to refresh the page and the last saved analysis will load

There are times when deleting a move at that level is wanted. I've had plenty of times when I have realized multiple moves later that I had a wrong move in.
As long as you don't save, you should be able to refresh the page and the last saved analysis will load
Under what circumstances do you want to delete a game move, not an analysis line move, but an actual move of the game? It seems uninformative.
Adding an alternate annotated line, instead of the move, seems a more typical approach.
Edit: .I can see if one is manually entering a game score that this would be helpful. My issue is if it is an actual chess.com game you should not be able to delete the moves. Detecting the difference in circumstance should be possible.

This is on purpose. It does not overwrite anything in our games database. But it makes a lot of things much simpler if we give users permission to alter PGNs as they wish.

Okay, I can appreciate that.
But the nitpicker in me wants the saved game with the moves of the actual score modified to have the games Details annotated indicating the actual game's moves have been edited.
Something like:

You can already manually change the details tab and when you save the PGN it will save what you typed there

Yes. Previously reported as a bug and fixed:
Bug ✓: Analysis Report -- Details - no fields should be editable, all are back un June 2019.
Broken and reported again as a bug:
Bug [ ]: Library Analyze view - Details tab's fields are editable! again in Nov 2022
What is the utility of permitting edits to the details of chess.com game?
A link to a "corrupted" ches.com game can be provided and there is no way the viewer can know that it is an edited result. The fields have been locked in the past, and chess.com games should be "detectable" to make the fields un-editable.

Yes. Previously reported as a bug and fixed:
Bug ✓: Analysis Report -- Details - no fields should be editable, all are back un June 2019.
Broken and reported again as a bug:
Bug [ ]: Library Analyze view - Details tab's fields are editable! again in Nov 2022
What is the utility of permitting edits to the details of chess.com game?
A link to a "corrupted" ches.com game can be provided and there is no way the viewer can know that it is an edited result. The fields have been locked in the past, and chess.com games should be "detectable" to make the fields un-editable.
Pretty sure you can't save edited details of the actual archived game, just to a saved analysis or Library entry

Yeah what Martin said. We don't ever overwrite actual game data. It just saves a copy of the PGN with the edits you made.

Yeah what Martin said. We don't ever overwrite actual game data. It just saves a copy of the PGN with the edits you made.
Yes. However one can't distinguish an unadulterated chesss.com game from a " detail corrupted" edited game. when following a provided link.
Here you go. The "same game", a win and a loss for drittman13
https://www.chess.com/game/live/94445525335?username=drittman13
- versus -
https://www.chess.com/a/sLkqPHpgQPk?tab=review
Here is the game that was saved after deleting White's 8th move, https://www.chess.com/a/uHQoHmxJgQPk?tab=analysis.
Here is an animated gif showing the delete move process that should not be permitted:

The fix:

Don't include, or deactivate Delete Move from the popup when dealing with the main line.