I needed to access an older Windows 7 VM (from PopOS 19.04, though I have no doubt it would work with Ubuntu too) and ran into the same problem. Dozens of websites were consulted, including this one. I setup the smb.conf with a shared resource, no problem. Then from the windows side I repeatedly tried to map a drive, using instructions from those sites, all of which said to use my Linux account name (correct), the virbr0 IP address of the KVM manager (also correct, e.g., 192.168.122.1. This is NOT the normal IP address of the Linux machine itself, of course), and to check the box saying "Connect using different credentials" - WRONG. After many tries, I decided to see what would happen if I did not check this box. Imagine my surprise when the drive mapped correctly, and I was able to read and write to it!
To the OP, be sure that you have enabled Samba, using:
systemctl enable smb.service
so that it will restart the next time you reboot your machine.
Also note that no firewall changes were needed, also contrary to what a number of websites had suggested. In this case, the use of the virbr0 connection from the Linux host to the Windows VM provides isolation from the main house network.
When creating the samba connection from the Windows side it is also unnecessary to select "Reconnect at logon"; to test this, I shutdown the VM, then restarted it, and clicked on a link I had made pointing to drive Z: (which is where I had the Samba shared mapped), and it immediately reconnected without adding the credentials all over again.
I can now share files between the Linux side and the Windows side with ease. Note: this is with Samba 4.10.0, which is the version from the PopOS and Ubuntu repositories; older versions may require other tweaks.