A common practice for desoldered chips is to throw them away. Regard them as "unreliable".
Desoldering requires a lot of heat because all the pins are soldered at once. This means that it will likely damage/degrade the chip. You don't really want to troubleshoot such foreseeable issues. It can suck a lot of hours for the cost of 1 chip (albeit a rather costly ATMEGA in this case).
I can imagine this cost of 1 chip vs hours debugging a faulty chip is a different trade-off for work and hobby. But even for my hobby purposes I don't bother. I rather spent my 1 hour on writing some code than messing about on some issue that only sucks time.
But for this case, there are better solutions. Prepare your target board in such a way that you can always "in circuit program" the chip. This is applicable for any target package these days, even if are programming a DIP chip in a socket. It's so much easier to have an in circuit programming tool, so you don't have to reposition the chip dozens of times. Additionally it may extend to an in-circuit debugger connection as well. For ATMEGA you can use the ISP for this.
Alternatively (no space for ISP header) you could buy a ZIF socket for the QFP package you're using. With this socket you could make up a programming jig that powers up the chip and breaks the ISP pins out to your programmer. This requires no soldering and thus no thermal stress for the chip.