the main problem here is that it's a modifier combination that is otherwise used as well. The windows key is used in GNOME so we can't just swallow it, we'd have to wait for the actual modifier combo. But by the time you get the P, the windows modifier has already been sent so you'd only ever get the display key with the modifier state.
It's one of these situations where we don't quite have enough information about the context in libinput to do it right every time. It's a lot easier to handle this in the compositor and while the whole situation is insane it's much easier to just accept that this is the sad reality, handle it, and move on.