Lagging on typing in Composition Mode

I am facing a strange lagging in the typing when in Composition Mode. In case of faster typing, it becomes somewhat annoying. I use a 2014 Macbook pro (Mojave) and tried different themes as a way of checking if it was some problem with heavy background images. Also quit most applications and ran only Scrivener 3. Finally, ran Onyx for maintenance, not to mention more than one restart, but had no success in solving the issue. Please let me know if there is any solution to this problem of if anyone else is facing this issue. Thanks.