Longer focal length lenses have shallower depth of field (DoF) than shorter focal length lenses if both are set to the same f-number when both are used at the same subject distance.
On the other hand, for the same lens and aperture setting a longer subject distance increases the DoF.
In the case of changing the shooting distance to maintain the same subject size in the frame the two factors at play here more or less offset each other fairly equally. Exactly how equal depends on how close or far the subject is with the base lens and shooting distance.
The following assumes an APS-C camera with a crop factor of 1.6X and a standard viewing condition of an 8x10 print viewed at 12 inches by a person with 20/20 vision.
If we use a 50mm lens set at f/1.4 at a distance of 10 feet we get a DoF of about 0.65 feet (7.8 inches). Roughly half of the DoF is in front of the focus distance and the other half is behind it.
If we use an 85mm lens set at f/1.4 at a distance of 10 feet we get a DoF of only about 0.22 feet (2.64 inches)! That is roughly 1/3 the DoF of the 50mm lens. But the subject will be 1.7X as large in the photo due to the difference in focal length.
So we then back up to 17 feet to make the subject the same size in the frame with the 85mm lens that it was in the frame at 10 feet with the 50mm lens.
If we use an 85mm lens set at f/1.4 at a distance of 17 feet we get a DoF of about 0.64 feet (7.68 inches), also fairly evenly split between in front of and behind the focus distance. We're not quite back to the 0.65 feet we got with the 50mm lens at 10 feet, but we're within 1.5% or so.
As the focus distance increases so does the difference between the two lenses when framing the same subject the same size.
50mm f/1.4 at 100 feet gives 73 feet DoF distributed 1:2 in front of and behind the focus distance.
85mm f/1.4 at 170 feet gives 68 feet DoF distributed 2:3 in front of and behind the focus distance.
This more or less continues until the shorter 50mm lens reaches hyperfocal distance at about 305 feet while the longer 85mm lens doesn't reach hyperfocal distance until 882 feet. Since any focus distance past 305 feet gives the 50mm lens infinite DoF (most of it behind the point of focus), it will have greater DoF than the 85mm lens at distances between 518 feet and 882 feet.
What is interesting is that the amount of DoF in front of the lens at 400 feet with the 50mm lens is about 227 feet. The amount of DoF in front of the 85mm lens at 680 feet (to frame the subject the same size) is 296 feet. So even though the 50mm lens at 400 feet has more DoF behind the subject, the 85mm lens at 680 feet (to keep the subject the same size) has more DoF in front of the subject.
In the real world, the resolution differences between the 85mm and the 50mm lenses will probably affect the perceived DoF more at these longer distances than the differences in theoretical calculated DoF.