A potential fix has been submitted to the master branch.. not on npm yet as I have not been able to recreate locally. If you want to try you can install manually
cd ~/.node-red
npm i node-red/node-red-dashboard
Note - this can take a very long time to install on a Pi - for some reason yarn installs it much more quickly.
Note2 - I don't know if this fix cleans up any excess groups etc... It may just prevent them occurring... so you may still need to tidy up first... as I said I haven't yet been able to recreate this locally.
I managed to get rid of excess groups by deleting mostly spacer nodes under the tab configuration/used.
Then I had to rearrange some ui layouts and then spacer nodes appeared again during deploying.
I entered the spacer nodes under dashboard and start edit, did nothing just pushed done and then I got rid of those objects during deploying. Don't seem to be coming back again.
@dceejay , Everytime I change the layout the excess groups with spacer nodes appeared again.
So finally I put extra empty template nodes in place to fill the empty places in the lay-out. Now everything is stable again.