Hello Vladislav,
Thank you for reaching out and I am happy to help!
Can you please share if this is a Multisite or the subdomains are created with the Polylang?
In W3 Total Cache, Performance>Page Cache>Aliaces, enable the Cache alias hostnames: and add the additional URL’s to Additional home URLs: save all settings and purge the cache and let me know if this helps!
If this does not help, please disable the settings one by one in Performance>general settings, save the settings and purge the cache after each setting is disabled and see which one might be causing the issue.
Thanks!