There’s known inconsistency between processing with and without DoH:
http://forum.mikrotik.com/t/v6-47-stable-is-released/140100/113
Don’t ask me why they did it like that, it doesn’t make sense to me either.
In your case, the command actually sends three queries for A, AAAA and MX. Without DoH, RouterOS processes all of them itself, returns address for A and no data for AAAA and MX. No data is correct state, not an error, there simply isn’t any such record in otherwise existing domain. With DoH, RouterOS returns address for A, but asks DoH server about other two. And server returns error, because whole thing doesn’t exist, there’s no .apl TLD.