Bedarbis I'd advise not running cron jobs as a user with sudo access, mainly for security reasons. In this case, the php command is not being run with sudo anyway, so it makes no difference whether the account has privileges or not.
While I don't see a reason why this is suddenly not working, it's possible there may be some permissions issue running the cron.php file (remember, "rat" may have sudo privs, but isn't using them in this cron job).
Do you need to keep the log outputs from the cron job? That /home/rat/cron.log file must be getting quite chunky.
If not, I'd suggest going with Kevin's suggestion of commenting out (or removing) the rat cron job, and setting up a new one as www-data
sudo crontab -e -u www-data
Then enter the following
*/2 * * * * php /var/www/osTicket/upload/api/cron.php > /dev/null 2>&1
Save and quit.
Whether or not you use the full path is up to you - my advice is to use the global php as then you don't have to keep updating the cron job every time you update PHP. If you have more than one version and want to force using a specific one, you can use the alternatives command. If there are multiple tasks this server is used for, then you can always fully specify the path - just remember to update the cron job when you update the server.
Once it's all working, set a maintenance schedule to apply regular updates to the server π€
Edit: Just to add, if you suspect it is a permissions issue, do not change the owner of all the web files to rat - that'll break a lot more than it fixes!