As others have said, M28 ignores comments in commands. Like you can (probably, I haven't tried) send console commands with comments, but they are lost as soon as the command is sent.
I can see why you might want to do this (maybe for logging?), but it's probably easiest to write the gcode file in a text editor, then send each line by copying and pasting that into your terminal program (I assume that's how you're connecting). Then you'd have a local editable copy of the file from the SD card, with comments. Or remove the SD card from the Duet, copy the file onto it locally, then replace it in the Duet.
Ian