The description of the true polymorph spell states:
Choose one creature or nonmagical object that you can see within range. You transform the creature into a different creature, the creature into an object, or the object into a creature (the object must be neither worn nor carried by another creature).
Creature into Object. If you turn a creature into an object, it transforms along with whatever it is wearing and carrying into that form. The creature’s statistics become those of the object, and the creature has no memory of time spent in this form, after the spell ends and it returns to its normal form.
If indeed a corpse or pile of bones could be considered an object, and the description of animate dead states:
Choose a pile of bones or a corpse of a medium or small humanoid. Your spell raises it as an undead creature. The target becomes a skeleton if you chose bones or a zombie if you chose a corpse.
Hypothetically, could a player use True Polymorph on an enemy, turn them into a corpse, and then use Animate Dead on them to turn them into a zombie?
If so, what would happen once either of the spells wears off (either from the duration expiring or loss of concentration)? How would this be resolved?