I am assuming your are referring to ChatGPT and with system message you mean the custom instructions.
That’s how I’ve been doing it for some time now. My impression is that the custom instructions are passed in only once at the start of the conversation instead of being repeated at each conversational turn, but I could be wrong.
During longer conversations with ChatGPT it helps to pass in the custom instructions repeatedly via user message and/or add a reminder to actually use the guidance provided.
There is something else you can try and that’s adapting the user message to match the custom instructions in some way. If you can bring the model to recognize a pattern between both you can influence the behavior according to your needs.