What could cause my 2003 ford crown vic police interceptor starter to run on its own without a key?

Starter still engaged after replacing it upon hooking battery cable up

Short in the electrical system will make the starter's relay engage for battery power without a key turn.

Stuck solenoid. Replace it.

Stuck closed start relay. A shorted ignition switch. A broken key barrel stuck in the Start position.

Get a test light. Key out of the ignition AND battery cable not connected to starter solenoid (do not let the terminal touch ground), check for power at the S terminal of the starter solenoid with test light connected to battery negative. Test light should NOT light up. If it does, check for a bad start relay or a bad ignition switch or the wire shorted to battery power or a broken key barrel.

Wired Wrong

Remove the wire from the solenoid terminal. If the starter still spins, the problem is within the starter or solenoid. If the starter does not spin, then work your way back to the starter relay.

You attached the positive cable to the wrong terminal on the starter. There's two big nutted posts, you either went to the wrong one or an ear of the wire terminal is bridging the solenoid posts.