This is a already reported in this bug: [https://github.com/nim-lang/Nim/issues/8015](https://github.com/nim-lang/Nim/issues/8015) "Const arrays losing object variants data at runtime" though in my case it was a proc field that was locked.
Seems like `enum` fields are also affected (and probably others).