If Shelly switches are controlled via a connected switch as well as via the Shelly app or other, higher-level home automation systems, inconsistencies may occur at unfavorable parameter settings.
In this german post, the topic was discussed and tested in more detail.
By appropriate adjustment of the settings, the problem can probably (usually) fix.