I have now 3 months my Huawei P10 Lite. Now I have the problem if I do not, for example, if I wipe my finger over the display that there's no data exchange with the Wi-Fi. Thus I receive z.b. Whatapp messages only when I unlock my phone or when I wipe my finger over the screen as I said before or when I open Whatsapp. I have already set in the settings, the Wi-Fi is always active. But I can't explain why it does not work. The same problem I have even if I have the Wi-Fi and I have mobile data consumption
Check the following settings:
WLAN / Configure / WLAN in standby mode
More / Mobile network / Mobile data always activated
Apps / WhatsApp / data usage / WLAN
Apps / WhatsApp / Data usage / Mobile data
Apps / WhatsApp / data usage / background data
Apps / Settings / Special Access / Ignore Battery Optimization
Apps / Settings / Special Access / Unlimited Data Access
Close Battery / Apps (WhatsApp should not be activated here)
Battery / Settings (the gear top right) / To power-intensive apps stop (should be off)
Finally, you should restart the phone, as some settings may not be adopted otherwise.