Currently xarm5 Cartesian solver has limitations on orientation dexterity, your proposed trajectory may be achievable in our next version. You can try with joint motion by manual teaching, or manual trajectory recording first.
When we have problems with trajectories, we try to simplify to simple joint motions and do joint commands.
For example, one time we had to do something similar to what you are doing except we wanted to go 360 deg around an object. We ended up mounting the robot above the part and doing a single 360 deg joint command on the first joint so the robot turned like a giant compass.
In your case, it looks like you are doing 90 deg of a full circle from the side. If you can position the arm joints and/or the object location such that a single joint needs to move to get the path you want, then you will get a very smooth trajectory.
It’ s a workaround but it might help you get the job done until a firmware update arrives.