This is country B considering something a citizen of country A did while in country A to be a crime. And not that it even matters but in country A that thing is legal. Like country B is a sovereign state and can arrest you for whatever it wants while you're there but the bigger question is whether country A should be mad about it and impress themselves on country B to get them to not do that.
That's really the issue here and exactly what the GRANITE Act he's proposing does.
It seems like the US is actually being too nice here. It's a perfectly reasonable position to reject the notion that a country has global jurisdiction and to consider such an arrest to be a hostile act against the US. I would be pissed the moment a country thought it could punish one of my citizens for something they did while under my jurisdiction—even something that I consider to be illegal.