When you chat - you chat with a chat server. The ip you see is that of the server not the client.

If you decide to share video (for example) then you make a direct connection between the two clients. Thus showing your IP instead of the server you are connecting to.

But if you really need to be anonymous - use TOR. Best option