Text editor bug? ACF repeater in a table

I’m having an issue with ACF repeater and also a related field. I’m trying to put those inside a table using a text module but the module seems to do some formatting on shortcodes as soon as I go over to the visual editor side. My aim is to wrap a row in a repeater or related tags, so that table expands as needed.
I’m using the Custom Content Shortcode plugin, but the behavior is exactly the same when I tried using the native BB shortcode with a repeater…

<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
[related field_related]<tr>
<td style="width: 50%;">[field field_name2]</td>
<td style="width: 50%;">[field field_name3]</td>
</tr>[/related]
</tbody>
</table>

As soon as I go to the visual editor (which I can’t avoid if I want to go back end edit the module), the code gets edited to this:

 [related field_related][/related]<table style="border-collapse: collapse; width: 100%;" border="1">
<tbody>
<tr>
<td style="width: 50%;">[field field_name2]</td>
<td style="width: 50%;">[field field_name3]</td>
</tr>
</tbody>
</table>

And obviously it’s not gonna work anymore. Like mentioned, behavior is exactly the same with the repeater shortcode (Use ACF Repeater fields | Beaver Builder Knowledge Base) . I was able to get a table work with html module using the CCS shortcode and related field, but I would like to use a text editor in some other places, especially when using a Tab module, which natively only accepts text content.

Any help is appreciated, thanks!

You cannnot go from text mode to visual. WP will strip anything it sees as invalid html. If you are just inserting HTML use the HTML module.

Ok, I see.

So only way to insert html content into a Tab module, would be to save that content as a row and embed using a shortcode for example?

in that case just use the text tab in the editor, dont switch to visual.

Thanks. Only issue that brings is that can never go back and edit the tab content, as it defaults to the visual editor.

ok the ultimate workaround would be to add your html/shortcode as a new shortcode, either using one of those shortcode plugins or some simple code… then you just add your new shortcode

That does sound like a good solution. Thanks for the help!