Not that I am aware of.
But you can play with different relative paths starting with ...
1 folder up ==> '..'
2 folders up ==> '....'
3 folders up ==> '......'
... or so ...
... to define the place where the new path string should be anchored.
You can help yourself by filtering the amount of input files by their folderdepth and handle folders resp tracks on different folderdepth by different Formatstrings.
See Mp3tag help manual "Scripting Functions" $folderdepth().
You can create a new column in the list view.
This will display a number for the depth of the folder, where the file is stored.
Another helpful trick might be to create a new column in the list view, which displays the foldername two steps up.
A Mp3tag Filter expression would be something like this ....
"$folderdepth(%_path%)" IS 4
Easy way to get directory names above Parent?
And keep in mind, that once a common node folder on a higher level has been renamed resp. moved, then all included lower folders or foldertrees have been moved too (each file has got a new path).
When repeating the same method on already moved folders, this possibly results into 'artefacts'.