In the past, when a plot is removed from graph, there was still a trace of it in the legend, requiring a manual refresh from the user (Ctrl+L) to update the legend.
In Origin 2024b, the legend automatically updates when a plot is removed from a graph. The corresponding Legend Update Mode in the Plot Details dialog has been updated to say Update when Adding/Removing.