Not sure if this is the best approach but it does work well.. almost.
I am using the Layout Builder Modal module which, in layout builder, opens block configuration in a modal. This is great but I would like to extend this capability to the front end so that I can configure a layout block without having to go into the node’s layout.
If I simply place the contextual link which this module creates on to my node page; sure enough it opens the required modal and allows me to change the configuration of the specific block. On submit the block config is changed and the modal closes, but the layout isn’t saved to use this new block config. This can be seen when I go to the node layout and it states there are changes pending. If I now save the layout I see my block config changes.
How can I programmatically force the node’s layout to be saved?