There is a first sale doctrine in Trademark, but it might not (probably?) won't apply here. First, courts have found that not all reselling falls under first sale if the products aren't exactly the same. Here, by delivering they are serving different food because it gets cold and soggy. They could also argue that In N Out doesn't provide delivery service and this place is selling that service using In N Outs trademark.
The damage to In N Out is brand devaluation. People might think that In N Out sucks.
A clear example is: You can resell macbooks. You can buy them, sell them, even repair them.
But you can't set up a fake Apple Store that looks like a regular one.
Doordash is argue they are doing the former, and In N out will say the latter.
A modified menu would be tougher. You can argue that there may be copyright infringement, and that may be valid to a limited extent, but DoorDash could put up a version of the menu that wasn't copyrighted, as its heart, menus are factual arrangements, and facts are not original creative works subject to copyright (though a specific arrangement of those facts may be). In N Out could also claim that there's trademark infringement if DoorDash is using trademarked food names, but I think it'd be a harder argument to win, since DoorDash can argue it's a nominative use.
IANAL.
Only way to avoid being sued into bankruptcy after you've pissed off someone big enough is for your company to be doing dozens of millions each year at minimum, and thus, have the resources to tolerate the associated legal fees. If you make someone mad before this happens, expect to be forced to shut down.