I'm wondering that it does not work. Normally prusa blocks communication until problem is fixed, e.g. when I have problems with mmu. Once fixed it continues to parse the send gcode.
In advanced configuration you can define actions on send strings from printer. Here you can also use e.g.
@pause Out of filament
You just need to add the message prusa sends on out of filament. Seems to be not the same marlin sends otherwise then.