You'll find
permit keepenv :wheel in /etc/examples/doas.conf. It appears to me that you've got such as simple configuration that it confuses the parser. Try adding an option, such as
keepenv, and see if it suddenly works. If it does, you've discovered a bug.