Tasmota, Losing Wi-Fi connection

Hi folks, I have a question. I have been experiencing issues with my sonoff flashed devices lately. I lose the connection to my WiFi network. The device runs for 4 weeks without any problems and so it loses the WiFi connection. When I unplug the device and restart it, the problem is solved. But it is a Sonoff Dual R3, it is built-in and therefore not easy to restart. Is there an easy solution to this or setting that I don’t know off.
My access point for my wifi is no more than 3 meters away from the device in the same room.

greeting and thanks for the respons.

[Off topic opening statement] ESPHome does this better than Tasmota. But Tasmota is great for switches, lights, etc…

Try a rule? (from reddit)

rule1

on Wifi#Disconnected do backlog

delay 3000 ;

restart 1;

endon

on Wifi#Connected do backlog

endon

​

rule1 1 
3 Likes