I got exactly the same behaviour in an network with 3-access points and same ssid on an:
* shelly-motion2
Running firmware:
* 20231122-131719/v2.2.2@a458c94d
And the problem was patched by adding a new wifi-ssid locked to one access-point only.
However the response times for ping is pending between 10 and 1500 ms which indicates other problems with the shelly-motion2 as well.