are u using the automated nextcloud install from ubuntu server ?
If yes, you are running smb vs nextcloud container ( i believe it is a snap ). The problem is that it has to be inside the snap, which is self-contained and doesn’t pay attention at all to the outside environment. Installing smbclient in the outside environment is pretty worthless for this…
A few month ago I have tried to use ubuntu servers 20.04lts going full snap on a bare metal… Well, it didn’t go well for my test. Adding complexity over complexity …
Seem’s you reach some of the blocking points i reach too…
I did not found any fix for this smg/snap share problems… sorry can’t help.