I think you have wasted money replacing a gear box, if you can tell us how much a gear box cost you?
Actually there is an electric grip above a gear box, when the car runs through a flooded roads the water gets into the grip and disturb the shifting, you must have noticed, after the weather gets dry, the problem subsided in dry weather