Can pilots change the callsign shown on tracking websites mid-flight?
Yes, a pilot can change this in-flight, just as they would have entered the data when on the ground before the flight.

On the A320, this is done from the FMGS (Flight Management and Guidance System). To do this, the pilot presses the DATA key on the MDCU (Multipurpose Display and Control Unit) keyboard. This brings up the following display:



And then selects the A/C STATUS page, which allows them to change the code (call sign/flight number):



This can be changed in flight by the pilots at any time. This information is sent to the ADS-B and other data-link systems that show up on radars and ultimately sites like FlightRadar24.