Separate mouse collision along borders with complex shapepainter shapes

so i’m prototyping a strategy game with a map that has a lot of diffrent provinces with their own borders

How do I…

have the mouse interact only with the shapepainter object it’s visibly pointing at, one at a time only and have it follow the borders. so players don’t accidently click the wrong province.

What is the expected result

i need to have the mouse interact only with the shapepainter object it’s visibly pointing at, one at a time only and have it follow the borders.
the most desired solution would be avoiding setting up collsion manually as much as possible, as i’m planning to include a lot of provinces (as i’m importing a lot of border vertice data via GeoJson)

here’s what happens de facto with the example i made specifically to clearly show the issue at hand. when i only really want to select only one at a time.
territory

Hi I think the collision on shape painter objects is just a box and not the shape - a box large enough to fit the shape in.
You might possibly need to use something like this Read pixels - GDevelop documentation
or use sprites

If you would make each province different color
Then there is read pixels extension and you can use to read color of pixel right under your mouse cursor

And so there goes your selecting method

Here
Example how to use read pixels