Glad you got it working, sorry you had to wipe your phone.
When you wrote" just spent 6 hours to restore the
majority of apps which still refused to be grouped in the same way on the home screen."
I don't understand why you can not place an app any where you want it on the Home Screen.
Unless, the grid was changed back to the
default App grid setting when you wiped your phone.
When I have a problem with a installed Magisk manager App that is
bad, I do the following:
- Unroot by flashing the unpatched init_boot.img to both slots:
fastboot flash init_boot --slot all init_boot.ing
- Remove all Magisk Manager App(s):
Settings ==> Apps ==> Show all apps
- Install the Magisk Manager app I want installed.
- Patch the init_boot.img with the newly installed Magisk Manager app.
- Flash the newly patched init_boot.img to reroot.