Where you have a server definition that includes a Login method and channel favourites that have Enable Join on Connect ticked, the Join on Connect happens before the authentication has taken place. If that channel has mode +r set then the join is disallowed and you get a 477 message "Cannot join channel (+r) - you need to be logged into your NickServ account".
The authentication being complete may be a little difficult to detect and may vary by ircd type. Here is what I get on Libera.Chat:
:NickServ!NickServ@services.libera.chat NOTICE mynick :You are now identified for mynick.
:NickServ!NickServ@services.libera.chat NOTICE mynick :Last login from: myaddress on Jan 29 10:13:43 2022 +0000.
@account=myaccount :myaddress ACCOUNT myaccount
It would be great to have an enhancements that when you connect to a server with a Login method set, then either:
A. doing a Join on Connect for favourite channels should be delayed until the authentication has been confirmed; or
B. autojoins are done immediately upon connection as now but if you do the autojoin and get a 477 then this is supressed and the autojoin is retried when the authentication is complete.