Barb vs Major Civ AI behavior is really weird:
1. Barbarian scouts will completely ignore civilian and religious units and will never attack your military units. In fact, you can block them with your units.
2. However, all Barbarian units (especially Scouts) seem to prioritize trade units. If one is in range, they will usually try to plunder it.
3. Major Civ scouts are more aggressive. They will sometimes attack your units (Archers, Scouts, even weakened Warriors and War Carts). They will opportunistically capture civilian units or destroy religious units.
4. However, Major Civ units seem to largely ignore trade units. I have been at lengthy wars with Major Civs where my trade units pass directly through my enemy's territory and I am certain they will get plundered (I don't have suzerainty of Lisbon) but the Major Civ's just ignore them.
If I have military Barbarian units around, then I'm in trouble. If it's just a bunch of Scouts running around, I can usually "defend" my trade routes with civilian units. I just place them all along the road, so that the Barbarian Scout can't enter the tile. If I also have a lot of Great People hanging around (a common issue with Russia due to Lavra's), I have the Great People protecting the trade routes. In my last Russia game, I had 5 Great Musicians by the Industrial Era (1 earned in Classical, 1 earned in Medieval, and 3 earned in Industrial) and so they were just chilling because I was far away from Radio technology. They hung out with my 6+ spare Great Writers (not enough Amphitheaters available) and 6+ Great Artists (Art Museums weren't available for awhile). So I just had them all chilling, protecting my trade routes.
I also keep around Workers and Missionaries with 1 use left. Workers can be used to repair things. If I haven't built Hagia Sophia yet, I might keep Missionaries around so they can get the extra charge when Hagia Sophia is built.
------------------------------
I will say that Civ VI does a good job keeping barbarians relevant (or annoying) throughout the game.
In Civ V, barbarians aren't a threat to you after the early game. Beyond Earth (base version) also failed with the aliens/barbarians, who didn't do that well. In Civ VI, by mid or late game, oftentimes, barbarians are a bigger threat than the other major civs.
Then again, it can get tedious constantly dealing with barbarians. It feels like a constant game of whack-a-mole. As soon as I clear a camp, a new one spawns nearby just a turn or two away. At least it makes Sumeria more interesting to play....