the improvised weapon rules state everything that an improvised weapons is and can do. Every weapon type does the same. Improvised weapon does NOT say it keeps traits when a ranged weapon is used in melee.
otherwise a crossbow used as a improvised weapon would have the loading quality and would need to be reloaded before making another melee attack with it.
And what are the traits of an improvised weapon?
1d4+str, ability to be thrown at a range of 20/60.
that’s it.
Specifically: “An object that bears no resemblance to a weapon deals 1d4 damage (the DM assigns a damage type appropriate to the object). If a character uses a ranged weapon to make a melee attack, or throws a melee weapon that does not have the thrown property, it also deals 1d4 damage. An improvised thrown weapon has a normal range of 20 feet and a long range of 60 feet. “
unless you’d like to argue that a crossbow needs to be reloaded before used again as an improvised melee weapon then your argument doesn’t hold water. You can’t pick and choose if you think qualities carry over. Regardless, 5e is specific- what a rule says is what happens. If it isn’t in there, then it doesn’t exist. And nowhere in improvised weapons does it state that it transfers existing qualities from the base weapon when using ranged in melee