Hey. Glad to help! Looking at your explanation and code, I can see a couple of things that might be causing the code to return an undesired result.
added an extra condition to exclude evaluation for Two Way Left Turn medians.
If you are trying to exclude those values from evaluation, then you might want to change the code to use the != (inequality operator) instead of the == (equality operator) for your $feature.MEDIAN value check.
So change from this (equals)
$feature.MEDIAN == "Two Way Left Turn Lane"
To this (does not equal)
$feature.MEDIAN != "Two Way Left Turn Lane"
The other important (and often confusing) thing to consider is which "out-of-the-box" spatial relationship in Arcade should you choose to evaluate the geometry of your two features. Esri has a great resource to play around with geometry types and their spatial relationships here: Spatial relationships | Documentation | Esri Developer
If you're looking to find median line segments that do not exist on a divided-highway, then the overlaps function might not work for you. It seems that you might want to try "disjoint" instead.
Here's the section of the code updated to use the disjoint function:
// For each of the features returned in the Filtered feature set
for (var c in cartoActive) {
if (disjoint($feature, c)) { // If disjoint is true
// Return the error message
return {"errorMessage": `Median feature does not exist on a divided highway. Route ID: ${routeID}, Object ID: ${objectID}`}
}
}
If disjoint doesn't work or you need a spatial relationship check that is more complex than the "out-of-the-box" functions, then you might want to explore the relate function.
This diagram is from MnDOT's RHUG presentation also illustrates the true/false result for various "out-of-the-box" spatial relationships in Arcade:

We found that for most of our checks we needed a function that provided a combination of Overlaps, Within, and Contains (not pictured) and excluded cross-streets and adjacent lines that share a start or endpoint with our feature being evaluated. To accomplish this, we selected the "relate" function that allows us to define any spatial relationship we desire. This function utilizes the Dimensionally Extended 9-Intersection Model (DE-9IM) to define the spatial relationship. Here are a couple of links that dive into the details:
Custom spatial relationships—ArcGIS Pro | Documentation
26. Dimensionally Extended 9-Intersection Model — Introduction to PostGIS
And here's a snippet that gave us the "Desired result" shown in the diagram above:
for (var c in cartoActive) {
if (relate($feature, c, '1********')) { // If true, return errorMessage
return {"errorMessage": "Feature shares a line segment with cartoActive segment."}
}
}