Lexical recently published new versions after I installed the version I was using (0.25.0), in 0.26.0+ they seem to have fixed this issue so no extra code needed for me.