As reported by moe _, finishing a rated game has no effect on the player who has an underscore or other odd character in the playername.
This uses the method escape_like from sqlalchemy_utils which will be a new dependency for running the ratings bot. This will require installing the package python3-sqlalchemy-utils on the server and also updating the lobby readme.