The filesystem running on macOS and Windows handles hidden files differently. The two approaches, i.e. prepending a dot
. character to filename or using
chflags hidden won't work as it will set the file as hidden on Mac and not on Windows.
The filenames prepended with
. will remain hidden on any UNIX/Linux system.
You can hide files on Windows by getting properties on a file and checking the "hidden" box on the general tab. This will only hide a file if you don't change the default behavior of Windows Explorer to keep hidden files hidden.