Data cables CAN be inside - but no in/out privileges.
You're installing an EV using EVEMS/Load Management, and you have a sensor module in the panel to tell the EV station the service load, so it can either prevent panel overload or capture solar you would otherwise export to the grid, etc. etc.
OK, there's what I call an "envelope" of NEC Chapter 3 wiring methods. Conduits, raceways, gutters, enclosures, junction boxes, a limited list of cable types (MC, NM, UF, SE, USE, etc.) All AC mains power wires must stay inside that envelope.
And, data cables cannot cross in and out of that envelope. This is often distorted into "data cables cannot be inside that envelope", because of course, 99% of the time people want to be outside the envelope at their router, enter "the envelope" to access an electrical conduit to the shed, then exit "the envelope" to connect to a switch at the shed. And we have to scold them not to do that. That is a network which must stay entirely outside the AC power Chapter 3 wiring method envelope.
But contrast with a case where someone has 0-10V dimming going to a bank of fluorescent lights. That entire network only connects the dimmer to the lights, so it's not hard to stay entirely within the conduits and boxes. That's fine.
Or a large campus has a bunch of conduits to carry power for HVAC equipment. They toss an Ethernet line in there for the SCADA system whose jacks are inside the AC wiring enclosures. Again that's fine because it stays entirely within Chapter 3 wiring methods.
And that's what happens with a typical EVEMS data cable.
So you're fine. Don't get psyched by that "data cables can't be inside" nonsense, that's just what we tell the IT department ;) They can be inside if they entirely stay inside and don't leave.
So if you just gotta gotta gotta go in/out, what do you do? One word. Fiber.
P.S. If you're running RS485, you're not running Ethernet. RS485 is like Spanish and Ethernet is like German. They're different languages that could run on the same telephone wire. When you say "ethernet" you probably mean "Cat 5E cable", that's the "telephone wire". That's important because Ethernet bridges e.g. to fiber aren't going to work for you, because it isn't Ethernet. No comprende.