I'm sure that the culprit is dnsmasq, because when the "obtaining IP address" error happens, it is temporarily fixed by restarting the "dnsmasq" service on the main router (no dumb AP) (temporarily because the problem occurs again later).
In OpenWrt 22.03.5 the problem is solved by replacing dnsmasq with odhcpd + Unbound on the main router and in OpenWrt Snapshot the problem is fixed.
If replacing dnsmasq with odhcpd + Unbound in OpenWrt 22.03.5 is also replacing udhcpc
(busybox) then you need to update dnsmasq and busybox to the latest version to fix this problem in OpenWrt Stable, because this problem is years old (you can type "obtaining IP address" in google) and it has already been fixed but only in OpenWrt Snapshot.
OpenWrt 22.03.5: (Broken)
- dnsmasq v2.86 (2021-09-08)
- busybox v1.35 (2021-12-26)
OpenWrt Snapshot: (Fixed)
- dnsmasq v2.89 (2023-02-04)
- busybox v1.36 (2023-01-03)
I hope someone takes note, because this bug/error is very serious and can be fixed.