This is one of the most annoying "features" in rpm
and it gets people all the time. The #
is only commenting out the first line of a multi-line macro. The proper way to comment it out would be
#%%debug_package
The first %
escapes the second; the result after macro becomes what you wanted.