Hello KKallas!
Please note that I assumed when you said "prefixes" that you mean group prefixes, as in prefixes that are part of a permissions plugin. After testing your skript on my server I ran into no issues with changing my chat color as well as keeping my group prefix. I used your skript as well as Luck Perms to test it.
If you would like further assistance could you please provide me with your permissions plugin as well as other another possible plugins that you suspect may be preventing your prefix from showing such as plugins that alter chat.
Thanks!