Yes, I see your point. I think it's because -w (which you used in your test) makes the debugger eval with warnings as well whereas -Mwarnings (which the OP used instead) loads the warnings
pragma as if it were explicitly loaded for the code being debugged while leaving the debugger's own separate interpreter instance unaffected.