Yeah it's a not so uncommon problem unfortunately. Triumph factory assembly tech put the threadloc on the wrong end of the bolt on the gear change actuator inside in the transmission.
As a result it loosens and leaves you with a floppy gear shift outside and stuck in a gear.
If you want to fix it you have to take the engine out of the frame, turn it upside down and remove the lower crankcase to get at it. The parts needed is really like a couple hundred tops but the labour costs thousands.
It might be more economical to get a replacement engine but yours is fresh enough and has the latest parts etc so not a great alternative.