Thank you for trying this out. The error occurs because you have the windows store version of WhatsApp. You can find the issue on Github here.
As mentioned in the above issue, please try the direct download version from their web and let me know how it goes.
All is working well and looking DARK! 🌃
Thank you so much for this 🌚❤️