Hi Ziqiao,
Thanks for help me out. I tried to create a new project and indeed there is no issue. I tried to move my model that has the issue to the new project and the issue persist. So your speculation of my .xcdatamodeld being weird is correct. You can find my project that reproduces the issue here: https://drive.google.com/file/d/1nHYsl9JANR9YI4jpXA98wDWp28BGQh50/view?usp=sharing.
Before opening the project, you can see that coredataissue/Model.xcdatamodeld/.xccurrentversion is GroupMetaData.xcdatamodel, but after opening the xcode project, the coredataissue/Model.xcdatamodeld/.xccurrentversion becomes Model.xcdatamodel.