Pitch oscillation issue in the pitch axis of a VTOL tricopter when changing the flight mode

Good afternoon, everyone. I’m new to using the ArduPilot autopilot, and I’m currently experimenting with a VTOL configuration in Tri mode. However, right now, I’m initially testing it as a Tricopter. When I take off and switch the flight mode to Loiter, there is a pitching motion on the Pitch axis. Could someone provide feedback on what the error might be? I suspect it could be related to the controller. I appreciate everyone’s assistance, and I’m attaching a sample video.
Test 1

test 2

Thanks for the videos. I seen this before possibly a change in CG can help. Peter Hall is the expert. there is a script called VTOL Quicktune that could be the ticket.

Thank you for the information @Cuádzilla