There is the aircraft code, there is the Flight ID which we are talking about and then there is the squawk.
Aircraft code never changes unless the unit is transfered to another aircraft.
Commercial aircraft change the Flight ID every flight unless stay on the same callsign.
GA flights are normally left on the reg.
The squawk is given by whatever ATC agency you are talking or 7000 etc.