AFAIK the aircraft identity is not coded into the transponder. ATC enters the aircraft ident into their system when they assign the transponder code. I would expect that if you select the same code it would cause problems with ATC.
Now if you were to coordinate with another known flight in the area and have them turn off their transponder as you turn yours on with the same code, that would be seamless with ATC.
That is not true (or inaccurate, as the guys in the pc would say). Each mode S transponder is set up before installation with a worldwide unique 24 bit adress obtained from a global registration. You cannot change this adress in flight. The adress is tied to the aircraft registration. The only codes that can be assigned or re-assigned is the call sign and the 4 digit octal transponder code.
Same 24-bit aircraft adress applies to 406 Mhz ELT broadcast.