#delete_key is an instance method of the dictionary class.
Most things you use #delete_attribute on, inherit it from it’s definition in the Entity superclass.
But not models. The Model class is not an Entity subclass, so it’s #delete_attribute method is unique (and is actually not documented.)
ADD: The difference in behavior will likely be avoided if you attach dictionaries to either the DefinitionList collection or your Definition objects. Both are Entity subclass objects so would inherit the #delete_attribute method that works.
Sketchup::Model have no delete_attribute. This is one of the unfortunate monkey-patches Dynamic Component adds. Extension authors should not rely on it.
And also echoing, that monkey-patch doesn’t do anything because it was always written with a bug in it, and wrapped in error trapper block that suppressed any exception being output to the console.