The patch is not a flag, it is a representation of the flag in patch form.
Same with the cakes, they are not flags but representations of the flag in cake form.
An argument could be made against having cakes resembling flags.
(i) The flag should never be used for advertising purposes in any manner whatsoever. It should not be embroidered on such articles as cushions or handkerchiefs and the like, printed or otherwise impressed on paper napkins or boxes or anything that is designed for temporary use and discard. Advertising signs should not be fastened to a staff or halyard from which the flag is flown.
I think a cake is temporary. We know how it usually gets discarded.
But, I like cake.