I fear that this is not easily fixable. AFAICS, you log on to an IRC server using your IP address, and when you connect to a VPN, your IP address changes. I think that the best Pidgin could do here would be to detect the routing change and reconnect automatically. (Notes: 1) I am another user, not a maintainer. 2) This should probably be made a Pidgin wishlist item).
I fear that this is not easily fixable. AFAICS, you log on to an IRC server using your IP address, and when you connect to a VPN, your IP address changes. I think that the best Pidgin could do here would be to detect the routing change and reconnect automatically. (Notes: 1) I am another user, not a maintainer. 2) This should probably be made a Pidgin wishlist item).