.lan is not a private TLD according to the standards, hence the warnings. Official private TLD are .local (but reserved for mDNS), .test, .home.arpa, and .internal.
I personally use this last one for a VPN with Headscale.
If you still want to use .lan, you will have to hack into YunoHost’s code every time YunoHost is upgraded. The list of special TLD is in /usr/lib/python3/dist-packages/yunohost/utils/dns.py on line 29, add yours in there.