In my case immediately after creating instance of editor like
const editor = ace.edit(container, { animatedScroll: false, });
I had to add
editor.renderer.setPadding(0); editor.renderer.setScrollMargin(0, 0, 0, 0);
only that helped