Ok, I think i have figured it out, I have probably messed up some permissions while mounting.
For help to the others.
Backup /opt/aliendalvik/system.img if something goes wrong.
unsquashfs /opt/alien/system.img to some directory, lets say ~/aliendalvik
Change whatever you feel appropriate.
Run:
sudo mksquashfs ~/aliendalvik system.img -comp lz4 -Xhc -b 131072 -no-exports -no-fragments -no-duplicates -all-root
You should get squashfs image matching the original one (except the changes).
Copy it back to /opt/alien (stop the android subsytem first), take care that ownership and permissions are the same as original system.img.
I wonder if jolla would have something against doing some community image (normally, still for paying users) with integrated microg, xposed and root? I would rather integrate magisk, but the problem is that magisk is using boot or recovery to start, while they are not needed here. But it would be great if someone knows how to adapt magisk to start from system image.