Some plugins (Visual Studio code, Chrome, ...) can use a local version of plantuml or on a web sever. The web server is really faster but has a big issue with %filename(). This version return an empty string on a server and generate error with Title, Caption, ...
@startuml
Title %filename()
actor actor [[{actor}]]
caption %filename()
@enduml

See on PlantUML Server
The workaround is to add a null character after like this:
@startuml
Title %filename() <U+0000>
actor actor [[{actor}]]
caption %filename() <U+0000>
@enduml
Would it be possible to include the null character directly in the %filename() function in server mode?