Issues with function calling in Assistants using GPT-4o

Hello, I am using OpenAI Assistants for one of my projects and lately I have been running into some issues with function calling.

Sometimes instead of calling a function the assistant will return some strange text that resembles an attempt of a function call rather than actually calling the function.

It usually looks something like this
Screenshot 2024-06-07 at 17.00.42

I feel like it’s been happening a lot more lately after switching to 4o compared to 3.5 and 4 turbo that I was using previously.

Anyone have any ideas what could be causing this?