We have Use Static URLs for Media Content in WYSIWYG set to No. And if we insert images with the "Insert Images..." button when the wysiwyg editor is hidden, it works. It inserts something like:
<img src="{{media url="wysiwyg/image.jpg"}}" alt="" />
It gets the correct data to insert using the link:
/admin/cms/wysiwyg_images/onInsert/key/<formkey>/?isAjax=true
Sending filename, node, store, as_is = 1, force_static_path = 0 and form_key. Some of this data is base64encoded
With the wysiwyg editor the element inserted is something like:
<img src="wysiwyg/image.jpg" alt="">
I see it tries to access 2 urls.
/admin/catalog/product/edit/id/1586/key/<formkey>/wysiwyg/image.jpg
Getting the error:
1 exception(s):
Exception #0 (Exception): Warning: DOMDocument::loadXML(): Empty string supplied as input in /vendor/magento/framework/View/Element/UiComponent/Config/DomMerger.php on line 327
And the url:
/pub/static/version1659521589/wysiwyg/image.jpg
getting the error:
Requested path 'wysiwyg/image.jpg' is wrong.
<pre>#1 Magento\Framework\App\StaticResource->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#2 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\StaticResource#000000007ce5886c0000000018f98acf#) called at [pub/static.php:13]
</pre>
EDIT
I installed a test version of 2.4.4, with TinyMCE 5, and after selecting the image to add. In the Insert/Edit Image dialog, the Source valur is different from the previous results:
admin/cms/wysiwyg/directive/___directive/e3ttZWRpYSB1cmw9Ind5c2l3eWcvZHVja2h1bnQuanBlZyJ9fQ,,/key/<formkey>/
It gets the result after accessing:
admin/cms/wysiwyg_images/onInsert/key/<formkey>/?isAjax=true
So maybe the problem is the url used in TinyMCE4 in my Magento 2.4.1.