Another head-scratcher with the Pencil 2 is that Apple doesn't sell a first-party case with a retaining flap for it.
The magnets are strong enough to keep it in place during normal use, but there's no way to put it in a bag and retrieve it without the Pencil flying off.
I eventually got a third-party case that does the right thing, it's just a strange oversight.
A few vendors sell a pencil-sized sleeve attached to an elastic strap that goes around the Apple case; I have one of those and it also works very well. Agree that it's an odd omission.