@joseph That's exactly the problem apparently. I tried all the filter options that I could find but without success.
I ended up installing a plugin called Generico and go it to work. It allows you to define "macros" directly in TinyMCE WYSIWYG mode that are later replaced by HTML.
I created a macro that basically adds an iframe. The weird thing is that the HTML generated by that macro does not have the sandbox
attribute in the iframe
tag.
So this might be an issue with TinyMCE itself. I haven't found any settings there either that would seem to address this issue. So the thing remains a mystery (especially since iframe embeding works fine on the Moodle Cloud).