Hi Aviv, yes, there is a workaround: use Blender 3.0.
It might be a matter of a few lines, that nedd changing, but the Blender API has changes between each Blender Version and from 3.0 to 4.2 (and why not 4.5, the latest LTS ?) is quite a stretch.
Someone else here might know what exactly to change, to make the 3.0 Script work in 4.2.
And if you go to: https://developer.blender.org/docs/release_notes/
You can see what has changed in each Version, so also in the Python API:
