If it helps, I am using MacXDVD ripper.
That seems to create valid files that AirPlay fine on my side (with the tryout version). I tried both the default output profile (General Profiles﹥MP4 Video [Recommended]) and the Apple TV profile (Apple Device﹥Apple TV Video﹥The New Apple TV (H264) [Recommended]).
… movies downloaded on my iPhone
How did you get the files on your iPhone? Maybe that is causing an issue … E.g. Home Sharing files can’t be streamed again via AirPlay; iCloud Drive files can only be screen mirrored. You have to properly sync the videos to AirPlay from the TV app.
Use Catalina or later to sync files from your Mac to iPhone or iPad - Apple Support
Use iTunes to sync your iPhone, iPad, or iPod with your computer - Apple Support
Have you tried AirPlay from the Mac (in-app AirPlay from iTunes/TV app/QuickTime Player/Safari) to the Apple TV (without the iPhone)?
Have you tried Home Sharing from the Mac to the Apple TV (without the iPhone)?