This question already has an answer here:
I plan on spawning Death Trap and letting him get kills for a long period of time for exp. Will any items that are dropped despawn over time (pc)?
Most items will despawn fairly quickly (within minutes, upon leaving the map or when tons more stuff spawns elsewhere), except for quest items and rare loot (green or better). Green stuff definitely sticks around longer than white, but it does seem to eventually despawn when off-map. Items of blue rarity and higher appear to either have unlimited or greatly extended lifespans, even when leaving a map.
So you can definitely be confident that some of the rarer stuff will remain, but I'm unsure if all of it will, as there's likely a despawn on green/rarer stuff as well so the game doesn't crash if you somehow piled up hundreds of them. This is all based on (300 hours of) casual observation though, I'm unsure of the exact specifics.