I believe we discussed and solved this on discord. For further reference for people with the similair issue:
The reason why this doesn’t work is because the SetTextChatEnabled(bool) enables/disables the ingame chat (the GTA Online chat) and not the chat resource (the one on the top left).
As of now there is no legitimate way of disabling the chat resource by code, you could add in your own way of disabling the chat resource by hidding the chat element via the NUI system.