- 🇪🇪Estonia minff
I can confirm that this issue persists and effectively renders webforms used in view mode page not usable if they require any Ajax (such as adding another element). The Ajax URL in the JSON code points to the main view mode and therefore results in a JS error.
Setup in my case: the content type has several view modes activated, with the default view mode not having any webforms (node/1), while other view modes rendering webforms (node/1/application, for example). Webforms function normally outside of the view mode but since the Ajax call points to the default view mode (node/1) when making the call, it results in an error.
The issue indeed comes from the \Drupal\Core\Render\Element\RenderElement::preRenderAjaxForm() returning the default view mode URL, as pointed out by the previous commenter. Haven't found any non-dirty fixes thus far.