NOTE: For us this problem occurs with Drupal 8.9.13. I have not confirmed yet if it happens in 9.x.
Problem/Motivation
After renaming a layout, or after switching to a branch where a given layout does not exist, any attempt to fix the layout configuration will fail.
Steps to reproduce
Create a custom layout.
Create a layout builder configuration using that custom layout.
Remove or rename the custom layout.
Attempt to edit the layout builder configuration form, OR try to use "drush cim" to revert to a configuration where this layout was not used.
Expected: Layout builder config can be repaired.
Actual: Error.
The "layout_xyz" plugin does not exist. Valid plugin IDs for Drupal\Core\Layout\LayoutPluginManager are: ...
Proposed resolution
Use try/catch in strategic places to recover from this.
Remaining tasks
See tags