The DeepL Plugin has a “Translate as plain text” function, but it doesn’t remove the locked content before sending the text to DeepL.
An option for the plugin to also remove this type of tag (and its content) when the plain text function is used would be very useful. Spaces should remain exactly as they are in the source text (I suspect that not doing this would create more problems than it solves.