There are multiple methods winbind can use to generate the uid<->sid mapping.
The default being tdb, which just generates a uid on the fly. As you noticed
it does not necessarily sync between machines. If you need uid sync, you are
better off looking at the rid module, which generates a uid based on the
windows sid.