Currently you cannot set $namespaceAliases in an extension's *.namespaces.php file, because it overwrites any other namespace aliases that have been set. This caused issues such as T60074.
When parsing an extension's *.namespaces.php file, the data $namespaceAliases should be merged with other extensions' data, in the same way as $namespaceNames is.