I have tried your solution verbatim and it works.
How are you testing it?
I am using VisualCode and the Live Server plugin and it works perfectly.
If I try to open directly the HTML file from the explorer with Firefox, then the VTT file is not loaded because it is flagged as a security risk. This can be seen in the console, with the developer tools. Maybe this is what is happening?