The system is built for real courts in real conditions. A few things genuinely help it, and a few genuinely fight it.
Light. Daylight is your friend, and an overcast sky is ideal: soft, even, shadowless. The enemy is low sun straight into the lens, which turns players into silhouettes and the sky into glare. If the sun is low, record from the end that keeps it behind the camera.
Weather. Wind does not trouble the camera. Rain on the lens does: a single droplet distorts everything behind it. If you play through drizzle, shelter the phone and wipe the lens between sets.
Surfaces. Hard, clay and grass all work. What matters more than the surface is contrast between ball and ground. Fresh balls are the cheapest analysis upgrade there is. A faded ball on a faded hard court is the hardest thing you can ask a camera to follow.
The ten-second test. Before you start, watch the preview. If your eye can follow the ball comfortably on screen, the recording is good. If you are squinting, adjust before you play rather than after.