How to write bpy.data.libraries avoid packed file with python?
Check the data
Chances are the objects are saved to the library blend, . but are not linked to any scene, or collection, hence the file appears empty when opened.
Check the library files bpy.data.object  collection to confirm.
Consider adding the scene datablock to the library.
You can try this.  I don't know much about...