As pointed out by @s-barannikov in post-commit review of #72356, the module is destroyed at the end of the constructor.
CodeGenTypes
CodeGen
3351097