Recently ran into the same issue after a series of core and server updates including the ImageMagick util, unfortunately it was discovered by an editor a few weeks after the updates so I'm not sure what part of the updates may have caused the problem to arise. The failure to scale is also accompanied by a warning in the site log.
The image toolkit 'imagemagick' failed processing 'scale' for image '/tmp/phpxyz'. Reported error: TypeError - round(): Argument #1 ($num) must be of type int|float, string given
Just leaving this here as an option for anyone else that comes searching as 9 and 7 slowly reach end of life.
While updating the drupal module code from bgilhome's D8 rewrite to be compatible with D10 is a simple matter, the CKEditor plugin as it exists within the module is only compatible with CKE4 which is being removed in D10 and would need to be rewritten for CKE5. A plugin rewrite was well outside my wheelhouse and the time I have available, so I gave up and went looking for an alternative. The new CKEditor 5 Paste Filter came up which also sanitizes on paste like Paste Format does (imo it's the only user friendly method, it's the reason why I stuck with Paste Format for so long), and is configurable per text format instead of being global. The switch for me was easy since Paste Filter's default configuration cleans everything I was already excluding with Paste Format without also removing anything that I would want to keep, but your mileage may vary on complexity.
CKEditor 5 Paste Filter:
https://www.drupal.org/project/ckeditor5_paste_filter →
CKeditor Paste Filter, if you're determined to stick with CKE4 as contrib:
https://www.drupal.org/project/ckeditor_paste_filter →
If you don't like the look of either of those and want to keep trying to rewrite Paste Format, I fully understand and wish you the best of luck. This is just what worked for me and may work for others with the time, resources, and expertise we have available. Much love to everyone who contributed to or left tips for Paste Format in 7, 8, and 9 and made my life as a site maintainer with a bunch of editors so much easier during all those years.