I'm from Poland, but my grandma was living in Germany (Essen). When I was (rarely, she was visiting Poland much more often) visiting her I definitely experienced similar behaviour from Germans.
My German is very poor, I used to somewhat understand what was spoken to me (if simple language was used), and to speak is short, basic sentences with shortage of vocabulary. This is just to provide some context - I never actually tried to learn German.
So I was trying to use English as often as possible. A lot of people - and I mean persons like clerks, salespersons, not random passers-by - either straight-up ignored me, or issuing comments like "Du solltest Sprachen lernen".
On the other hand, I never had similar experience when I was speaking broken French in France (or Marocco).
Please note that I don't want to bash Germans or to defend French. But it all depends on who you encounter - but these encounters might on some level shape your opinion on the whole nation no matter of you want it or not
Since I'm also from the region and familiar with local issues: are you sure this was not the good old anti-immigrant hostility? Germany has (or had) a lot of immigration from Poland and some locals could think you're an immigrant who refuses to learn the language. In my country I sometimes see similar behavior targeted specifically at Ukrainian speakers.
FWIW, I only ever experienced the discussed issue (locals who clearly understand English but refuse to acknowledge me or respond in their language) in France. I really suspect it's specific to french speakers. They uniquely feel that their language was lingua franca and lost the status to English.
Could also be anti-immigration sentiment, because I'm from the US, but I traveled to Germany a few years before the pandemic and while there was only ever one German person whom ever gave me crap about English, there was indeed one and it was a very inconvenient person to take such a harsh stance on. It was in a little airport (which, if it matters, was very close to france) that we were taking to leave Germany and head down toward Italy. The person looking over the bins for carryons was herding people through and she pointed at me and said something I didn't understand in German. So I guessed and pointed at a thing or two, and when she kept saying "no", I finally gave the ol' "es tut mir leid, mein Deutsch ist schlecht. Sprechen sie englisch?", to which she replied slowly and aggressively: "noooo. sprichst du deutsch?"
Which... is certainly understandable! I'm sure she sees a lot of tourism and tourists. But for a neurotic person, being singled out as someone holding up the line by someone who is ostensibly there to help things move faster, because I didn't know a language that I expressly said I didn't know and apologized for, was quite jarring. Up until that point, every single person I met with talked to me like I had a second head that they were generally aware of but didn't care about while they tried to be as polite as possible about not bringing it up. It was a kind of clipped politeness that I have been told is just "german". Nobody cares to be friendly, everyone just wants to exchange only the information needed and, while they do so, they would be as happy and pleasant as a person could be. But as soon as the information had been exchanged, they were right back to bewildered disinterest ("why are you still talking to me? we've finished.", while smiling and nodding).
Anyway, whatever it was that she was trying to tell me, the message never got through. When I answered "no" to her question, she just moved me on through. So maybe she was trying to be polite and I showed my ass or something. Or maybe she was just trying to make a joke and then moved past it when there was no way to make me get it. Whatever the case, I left with the distinct feeling that the author described about that French street. "some people here, sometimes, are going to be very uncharitable about your lack of cultural integration. beware of that." Which, on the one hand is pretty obvious; people are just people all over. But on the other hand, it's probably something most cultures would aspire to minimize.
My German is very poor, I used to somewhat understand what was spoken to me (if simple language was used), and to speak is short, basic sentences with shortage of vocabulary. This is just to provide some context - I never actually tried to learn German.
So I was trying to use English as often as possible. A lot of people - and I mean persons like clerks, salespersons, not random passers-by - either straight-up ignored me, or issuing comments like "Du solltest Sprachen lernen".
On the other hand, I never had similar experience when I was speaking broken French in France (or Marocco).
Please note that I don't want to bash Germans or to defend French. But it all depends on who you encounter - but these encounters might on some level shape your opinion on the whole nation no matter of you want it or not