Guys, all these patches only work if you don't manually hide (or manipulate in some other way) some fields like moderation state through node edit form hook. Which is allowed by design. If you do have such customization then moderation state change form is no longer available for you after you save a node in draft mode. It will always be published. Because the patches operate on a widget level they should also consider all the widget derived functionality.
For further detail, please check my comment above.
The issue can be more complicated:
Imagine the situation:
We have a node with content moderation. The node was saved and the moderation state is now "Published".
Now you want to edit that node.
If you have a hook that alters node-edit form to hide the moderation_state widget setting '#access' to false, then when the node is saved in a draft state (can be default state, but remember: the '#access' is false) and it is supposed to redirect to the "view draft" page with the moderation state change form instead it redirects to the "view published" page, because when the code in the WidgetBase class with the patch runs it checks the visibility of the widget and because the '#access' is false it skips the moderation_state field and the node state is still "Published".
The issue here is what is the definition of the "#access" attribute? Is it to hide some components? Or is it to suppress the access to change some values? Because nowhere in the render-array design the actual values are protected from accessing if the "#access" attribute is set to false.
I confirm we have the same issue in our unit tests. We use different db drivers in our project. And after upgrading to 10.2.1, test that use different dib drivers are no longer working in our project. Would be nice to give it a priority or provide a fix. In our case sparql driver doesn't work anymore.
Regards