Agassi's problems in the four GS in 1998 was self-imposed pressure, huge pressure.
He knew he was playing great again (in fact, as I said, he was the player with more points that year outside GSs), he played 10 finals (winning 5 ). Only in 1995 he played more ( 11 ). So he was obviously playing very well again.
But what he wanted was to win GS tournaments. That 1995 US OPEN final loss to Sampras left a deep scar in him, and he wanted so badly to win a GS again.
He also had a bit of bad luck. In the AusOpen he faced Alberto Berasategui (former nº7 in the world) in R16 playing the best tennis of his life on hard courts (Alberto had defeated nº2 in the world Patrick Rafter in the previous round in a very close four setter). Agassi was leading 6-3 6-3 and then kind of relaxed a bit, and Alberto never looked back, coming from behind to win 3-6 3-6 6-2 6-3 6-3 in, possibly, his best hard court match of his life.
In Roland Garros Agassi in the first round faces a 18-year-old new-talent named Marat Safin. It was a great five setter, and nobody expected that young talent to defeat Agassi in a fifth set, but Safin at 18 already was showing his talent and self-esteem. By the way, in the next round, this young kid Safin defeated Roland Garros defending champion Gustavo Kuerten in five sets again, and he went on to the R16 where he lost to Pioline (a great 90s player on any surface) in five sets again.
After these two close five sets losses (AO and RG) Agassi's confidence was shot. In Wimbledon he lost a close four setter to Tommy Haas in the second round, and his lack of confidence in the most important points was patent.
After Wimbledon he wins two consecutive tournaments (without dropping a single set), and makes a SF and another final during that summer hard court season.
In the US OPEN he loses again in the R16, and again in five sets, to Karol Kucera, but Kucera was a VERY dangerous player (in that era of faster conditions and faster balls, there were players like Kucera, very talented flat-hitters, that could defeat anyone on a hot day) and Agassi lost a close five setter against a very inspired Kucera (who that same year defeated Sampras in the AusOpen in the QF).
So Agassi was at a great tennis level overall again in 1998, but in the four GS he lost very close matches against difficult and/or red-hot-that-day players with a bit of bad luck and lack of confidence in the most important points of those big matches.
Sincerely I think that loss to Rios in Miami didn't make any long-term effect in Agassi's mind.
It was much more his anxiety to do well in the GS again.