The changes made in May 2025 to support folders for Custom Functions, and that already supported folders for Scripts work by traversing the sub-nodes of the 1st object if it is Group. However, if that 1st object is an empty Group, I suspect the isStringValidFMObjectXML function in fmObjectTranslator will not continue checking other Group nodes until it finds an actual CustomFunction or Script sub-node. If that's the case, it won't think the XML is valid to represent FM objects.
So, need to test if that is true and, if so, need to fix that.
How does FileMaker handle copying only an empty CF/Script folder? Can you paste it into both Manage Custom Functions AND Script Workspace?