Are you trying to change the “Name” attribute from the generalization “FileDocument”? If so, I'd recommend instead using an extra attribute in your specialization (like “CustomName” or so) and showing that in your application. This also prevents the user from changing the filename into something that breaks the file (for instance, by removing the “.docx” after the filename).
That way, you'll still have the original filename as it was uploaded stored safely in the FileDocument.Name attribute, but a separate attribute for the name you want to show throughout your application. This would still be a problem when downloading / exporting the file, but if that is the case you could still use a custom flow to set the filename to the custom name the user chose plus the correct file extension.