If is working this way, it probably means that you are using a version older than 1.2019.6
You can double check this by using:
@startuml
version
@enduml
When you will upgrade to 1.2019.6 or newer version, you will have to update your files like this :
!include %getenv("MACRO_FILE_VAR")
Note that some other changes may be necessary (see http://plantuml.com/preprocessing ).
So if possible, you should test your files with the newer version on some test config before upgrading.
Which tools/plugin are you using ?