Fix GH-15731: Prevent #[AllowDynamicProperties] on enums
#15733
Merged
#[AllowDynamicProperties] on enums
#15733