The alternate flag, # , adds a 0x in front of the output.
So because dbg! uses #? all the hex numbers get a 0x put in front.
I think this is probably an unintended effect, especially as it's inconsistent with the special case versions (e.g. ::1). If you want you can try submitting an issue on the Rust repo and see if people agree that it's a bug.