Freezing the configuration was unfortunately not enough. If a bean is instantiated in an AOT refreshed context, the merged bean definition is flagged stale and it is merged again. As a result, changes made to it are lost, typically the destroy method names.

Comment From: snicoll

markBeanAsCreated is clearing the cache for the bean name.