AFP and SMB just pass along file system actions to the remote server, and that server makes the changes.
It is app/process specific whether the edited file is writing to a new file (hence a new inode) or if the app overwrites the file. AFP does have a protocol mode to write a tmp file, then tell the file system to swap inodes and metadata information (owner, permissions, etc...). Complicated as all get out to implement that on a non-Apple file system. Not all remote servers may implemented that protocol item. No clue about what SMB might offer.
If the app is writing changes to a new file, then doing a rename. The new file will be owned by the user that created it.
Depending on the host operating system, it may be possible to put an inheritance ACL on the parent directory that applies some useful permission ACLs to newly created files that will make shared access easier.
My day job is as a file system developer (Linux, Solaris, AIX operating systems), and what I described is exactly how a Unix based file system should work (macOS is a Unix based system, and they adhere to the relevant POSIX standard for file system APIs).
While early in my life I had experience with AFP, I have not had a need to learn much of anything about SMB. I use it, but it is a black box to me.