Unfortunately, this is the result of an intentional change in the jsscripting metadata handling. You can see the technical explanation here: Main UI JavaScript rule reload causing /rest/items failure - #10 by florian-h05
As a result of this change, none of the functions of these sets of rules that write some of the metadata work with 5.1. Even worse, there is the possibility that the the metadata will get overwritten with incomplete configurations instead.
Reading the metadata and the actual OH actions of the rules should still continue to work, but because of the significant issue, this rule cannot be considered compatible with 5.1 without additional changes to the jsscripting library.
Updating the whole system for compatibility with 5.1 is not 100% out of the question, but it would be a significant re-working of the entire structure.