Problem/Motivation
This is a follow-up for #2824097: Deep serialization for content entities to make an exact snapshot of an entity object's structure based on its current state to make the form cache store the deeply serialized entity.
Proposed resolution
In ContentEntityForm::__sleep flag the entity for deep serialization.
Remaining tasks
Write Patch, Review & Commit.
User interface changes
None.
API changes
None.
Data model changes
None.