Transaction not beeing applied

I noticed that in first function window.MutationObserver is triggered to rerender DOM, but in the second function editor state is kinda beeing updated but its not triggering browser DOM to update