After my testing, the cursor misplacement problem only occurs in macOS Chrome. So the solution is that something is interfering with Monaco's cursor positioning.
The global CSS base configuration interferes with the Monaco editor fonts.
So, We should specify FontStyle in Monaco options, not in our CSS.
Fixed bug reported in https://github.com/jquery/esprima/issues/2028
After my testing, the cursor misplacement problem only occurs in macOS Chrome. So the solution is that something is interfering with Monaco's cursor positioning.
The global CSS base configuration interferes with the Monaco editor fonts.
So, We should specify FontStyle in Monaco options, not in our CSS.
After testing, it works well.