After endless attempts, it turns out that the whole problem was in the plugin itself, and the plugin itself was written for me by ChatGPT, and I can now say with certainty after endless attempts - he can't write plugins at all!
@Mastodon You may sometimes wonder, ‘Why doesn't that work?’ but at first glance, it looks well implemented. Great. Thank you.@DJGummikuh this is for you (and me)