The code engine in DW CC 2017+ is not the same as Creative Suite. The new code editor behaves a lot like Brackets because it's built on a Brackets code engine. That said, line numbers in Brackets cannot be highlighted either.
You would need to revert to a previous version of DW (2015 or earlier) before the Brackets code engine was added.
If you're a paying member, you can get previous versions from your CC Desktop app.
Appreciate the quick response and suggestion, Nancy.
DW now uses a somewhat watered down version of Brackets as the code engine. Because of that, there have been a LOT of changes to how the Code View functions.
There's no setting to change the behavior as far as GUI Preferences go (most need to be done directly in the file that the program uses), but if enough people want it back, Adobe might be persuaded into figuring it out within the Bracket implementation they've used, if enough people vote for it in the Feature Request/Bug Report forum...