Node group interfaces for 4.0 are written to blend files as legacy data to enable forward compatibility. This data is meaningless in 4.0, so if a blend file contains it, the data should be freed right away. The code for freeing legacy data was incomplete. Pull Request: https://projects.blender.org/blender/blender/pulls/111989