Not sure what you are asking but will give it a shot.
Is it OK to drive it, yes............until it isn't, what that means is that something in the transmission has failed, could be metal fatigue, general wear, or ???
But 5th gear is either no longer secured to counter shaft or it's Dog Gear can no longer engage it, if Reverse still works then 5th/reverse shift fork still works.
5 speed Manual transmission uses 3 shift forks and 3 Dog Gears
1st/2nd
3rd/4th
5th/reverse
The 6 gears(1-5/reverse) themselves are always "meshed" and secured onto input shaft/counter shaft
But not to output shaft(rear wheels)
(4th gear in a 5 speed is not really a "gear" with teeth, it is 1:1 ratio so just a straight connection of input shaft to output shaft)
The Dog gears are secured to the output shaft, and one double sided dog gear sits between 2 transmission gears, like 1st and 2nd, when you push shifter forward to engage 1st gear the shift fork for 1st/2nd moves the 1st/2nd dog gear towards 1st gear, if there is synchromesh then it will start to spin 1st gear to match the spin of the dog gear and then dog gear will lock into 1st gear slots that match dog gear tabs, and now 1st gear is engaged to output shaft via the dog gear.
3rd/4th and 5th/reverse work the same.
Neutral is when all 3 dog gears are between their respective gears, not engaged
So what is wrong with your trans?
Can't say.
Would expect further trouble just because there is trouble now, but no crystal ball here.
Towing bills can be expensive and transmissions can fail with rear wheels locked, dropping drive line will allow moving it.
If it were me I would shop for another trans, or rebuild it sooner than later