@Urszula Gryczan Welcome to Microsoft Q&A Forum, Thank you for posting your query here!
If the subscription under which the file share is deployed is associated with the same Azure AD tenant as the Azure AD DS deployment to which the VM is domain-joined, you can then access Azure file shares using the same Azure AD credentials. The limitation is imposed not on the subscription but on the associated Azure AD tenant.
The Cloud Endpoint (File Share/Storage Account) and Storage Sync Service can be in separate subscriptions but must be in the same AAD tenant.
For more information, see: Azure File Sync resource moves and topology changes | Microsoft Learn
Hope this helps!
Kindly let us know if the above helps or you need further assistance on this issue.
-----------------------------------------------------------------------------------------------------------------------
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.