Thanks for the clarification.
Based on my research, the dynamic query would always use COALESCE regardless of the "Allow unrestricted measures" option. As to DirectQuery mode in Power BI Embeded, then I think you're using a Azure database? So far I can't think of any workaround to bypass the performance issue. Maybe you can try to upgrade Azure database to a higher service tier or use import mode instead.
Please submit an feedback on Power BI Ideas. Meanwhile I will report this internally and post back if there comes any update.