So here's the thing (well...three things):
One, that coffee panel is one of approximately 3-4 times across the entirety of Tim's appearances that we've seen him buy and/or drink coffee on panel. This is, mind you, despite Tim having a 183-issue solo series as Robin, a 26-issue solo series as Red Robin, and co-starring in both Batman comics and two team books (Young Justice and Teen Titans) regularly for 33 years. It does not, in fact, "have its roots in the comics."
Canonically, Tim enjoys tea (which is coincidentally what he's taking from Alfred in your first panel, if I remember correctly) and loves Zesti soda, which is (more-or-less) the in-universe equivalent of Pepsi:
Tim definitely has sleep issues, but they are not the result of a coffee addiction; rather, they're the result of purposeful, forced late nights to engage in case work. Actually, frankly his chronic "falling asleep in random locations" issue wouldn't be possible if he were a coffee addict.
Canonically, Barbara is the coffee addict of the Batfam, to the point where she has canonically been teased about it. Babs' ever-present coffee cup in her hands and/or next to her computer was a running gag for quite literally years, even in the New 52 era when DC refused acknowledge Oracle existed:
So like...if you want a coffee addict, Babs is right there.
Two, the problem is not necessarily the fanon that Tim loves and is slightly addicted to coffee. The problem is that fanon warps that otherwise harmless headcanon into a personality trait, where Tim's depiction in fandom content revolves around coffee and his love of it. It's obnoxious at the best of times, and significantly worse when it (as it often is) the harbinger of several other fanon!Tim traits. Which of course, brings me to...
Three, the backlash to coffee addict!Tim isn't actually about whether or not he actually likes coffee, but because it's an effective shorthand for all of the stuff that encompasses fanon!Tim, which people in the fandom who actually read comics tend to REALLY dislike. It was a small but obviously noticable thing people could point to that signaled to comic readers that so many fans not only don't read comics but go "fuck reading comics, all my homies hate reading comics," especially when it came to a) characterizing Tim and b) depicting canon events in fan-produced content.
The point is not really "does Tim actually canonically like coffee" or "is there a basis in canon for saying so." The point is "this is a small but very visible sign that you are probably about to encounter a version of Tim Drake written by someone who genuinely has no fucking clue how Tim Drake actually canonically acts, nor do they understand the actual context behind certain canon events and interactions they are about to attempt to depict."
To put it a much simpler way: comic readers think fanon Tim sucks, and fanon!Tim's coffee addiction became a flashpoint for how we talk about our dislike for fanon Tim because it's a very simple and obvious thing people can point to and say "that's simply wrong."