The CHECKOUTS_PATH path in build_framework.sh is wrong; there is no such folder in the project folder (DerivedData/SourcePackages/checkouts).
In addition, the files of language queries are searched in the CHECKOUTS_PATH folder even though they are in the RESOURCES_PATH folder. Therefore, the newly added language is not included in the package when the xcframework file is built.