How to fix Anki replacing `>` by `>`?

Not sure why you are saying this is a last update issue. Anki always stored field contents as HTML. Representing < and > with &lt; and &gt; in the source is a core part of the language, otherwise they would be confused with tag brackets.

If you are looking for a practical method of storing non-html code in note fields, using JS to retrieve textContent is the conventional way.