maybe some things in the gearbox are touching eachother? Like, synchros or something against something else, when such things shouldn't have any contact with eachother. Which could suggest why the sound doesn't exist when in gear.
I don't know anything about the workings or internals of a gearbox, but yeah, thats as far as my limited knowledge can determine.