I have a nagging suspicion that something similar has been reported before but I can't find a match. For me, this is repeatable with the latest beta 12.7.1 and a vanilla configuration.
To recreate, unzip the attached bugtest.js to Script Addins and add a bugtest command to the All files and folders context menu. Select at least two items and then trigger the command from the context menu. A "Fle Function" dialog appears behind the dialog that is displayed by the script. If the same script is fired from an instant >bugtest command, the problem does not occur.
bugtest.zip (1.1 KB)