As you probably already noticed, you can show and hide the gcode macros in the interface settings, but there is more…
Did you know, that you can also hide gcode macros by prefixing the name with an underscore?
[gcode_macro MY_AWESOME_GCODE] gcode: _MY_HELPER_CODE
[gcode_macro _MY_HELPER_CODE] gcode: M300
MY_AWESOME_GCODE appears in your interface settings,
By the way, this also works for other configuration sections like, fans and outputs.