Hi Widge
Looking at photos of the 2023 Mp3 530 HPE, it looks like it has the same general glove-box arrangement as my 2016 Mp3.
See link with view of glovebox above the dashboard
https://cdn-0.totalmotorcycle.com/wp-content/uploads/2023/03/2023-Piaggio-MP3-530-Exclusive4.jpg
You would have to figure out a way to run a silicon bead or glue a rubber gasket to the perimeter of the glovebox. The lid would then engage with this soft layer to form a seal against water. But it wont be perfect as the lid is not an even shape so the gaps would be uneven around the opening.
But unless your regularly stopped in heavy downpours it may not actually be an issue. I've ridden my 2016 Mp3 for hours in heavy rain with winds on road-trips up north. There was no water intrusion of any real amount into the unsealed glovebox. My phone was fine, paper gas receipts where intact, etc.
The windshield does a decent job of keeping the heaviest weather from directly affecting the glovebox. When moving at speed the wind blows the raindrops up and around the glovebox, not into it.
Perhaps if you where sitting idle in a heavy rain for an extended period or pointed a garden hose at it then it could get significantly damp within. Maybe if the rain was blowing hard from behind or the side, but even then it would be minimal if any real issue to worry about.
If you have things that MUST stay dry in the glove box then flybynight suggestion for a waterproof bag is the best solution. That or find a spot away from the glovebox to store anything thats sensitive to moisture.
Your millage will vary of course and everyone's local weather is different, but in many years of riding in the rainy season I've never had an issue.