LOL - the previous request was also by me, but I had forgotten all about it!!

It is getting the following message from Nickserv which does not contain the required strings to continue waiting so it tries to join the channel:
Code
:NickServ!NickServ@services.libera.chat NOTICE Sophist-UK :You have 10 seconds to identify to your nickname before it is changed.

If you are willing to put the effort in I would recommend the following:

1. Remove the code you put in last time
2. Add code that reacts to a 477 message by: A) hiding the message; B) waiting (say) 5s and retrying the join; C) repeat the retry up to 12 times taking c. 1m and then show the final 477 message to the user and stop trying.