Calculating width and height attributes with the image plugin (tinymce)

I have a question about the standard image plugin for TinyMCE. You can read about it here: link. To describe the issue, please try the following:

  1. Open this https://codepen.io/kxfjxbja-the-vuer/pen/BaEQEwR
Code with tinymce v6.
  1. You will see an image inserted twice. One of them has the style “max-width:200px;”

  2. Right-click on the first image.

  3. Click “Image.”

  4. You will see the “Image” window with empty attributes width and height.

  5. Simply click Save.

  6. If you open the “Image” window again, you will see that the width and height attributes have been automatically calculated. Issue: they are calculated from the styles, not from the actual dimensions of the image.

  7. Do the same with the second image. You will see that the width and height are different, although it is the same image with different styles.

What I want: for the reduced image, the width and height attributes to be determined from the actual dimensions of the image, not from the styles.

Why do I need this: I want to see the images in the editor reduced. Large images are inconvenient when designing an article. So I added CSS to my website to reduce the images in the editor. But when I edit image properties, small width and height attributes are applied to it. And after publishing, they remain small, which I don’t need.