The Frames are not dynamic - there is no way to destroy a Frame. What is happening here is that those are internal Load on Demand AddOns - when you hook ShowMacroFrame (which is defined in UIParent.lua), the Blizzard_MacroUI AddOn has not yet been loaded (it is done so when ShowMacroFrame is called) so attempting to hook MacroFrame_OnHide will of course fail.
- if your addon only deals with the macro frame, put Blizz's macro addon in your TOC on the "LoadsWith:" line and make your addon load on demand
- if you addon uses multiple frames (macro, pet journal, etc) which are created in LoD Blizz addons then watch for the ADDON_LOADED event for these addons
I'm catching not only OnShow/OnHide of MacroFrame, but also PetJournal, SpellBookFrame, PaperDollFrame - i.e. frame from which player can drag spells, mounts etc to put my addon in proper state. Last 2 frames was easy, MacroFrame and PetJournal harder.
Also I'm hooking OnHide to leave that state, so OnLoad not enough.