Unfortunately I have the same issue. Trying to do an initial Time Machine backup on my M1 Ventura Mac and it will randomly lose connection to the Samba share. It's now over 5 days it's been doing intermittent backups and yet to finish due to the issue.
Tried different Samba configs on Unraid server based on what I've been reading on this forum, but to no avail. So not sure exactly where the problem lies, on the mac itself or something with the Samba version Unraid 6.11.5 is using.