Is it possible (in QGIS 3.16) to retain the layout of windows. So whenever I open the project it opens as below?
Critically the Attribute table in Form view with the Pan option on the RHS and a python script open and running.
I'm running 3.28 in the Project Properties, General Settings I see the checkbox "Remember attribute tables windows and docks between sessions" which seems to do what you want. Not sure when then was added.