the maximum speed is the instant it loses contact with the racket (not the instant you hit it). After that, air resistance slows it.
When you throw a ball, the instant it leaves your hand it is at max speed (technically, max velocity in direction of travel).
ie. when either your hand or the racket stop touching the ball, there is no force accelerating the ball any more, so the only forces acting on it are air resistance which will reduce the speed and gravity which will accelerate it towards the floor.
I suppose you could be pedantic and say that gravity might accelerate the ball further, but I'm sure that a tennis ball's terminal velocity is lower than the velocity of a struck one.