Imran explained it perfectly in his book for Hick, applicable for Ramprakash as well.
Hick was a predominately front foot player, whose entire game was built on stressing front foot to the pitch of the ball and drive through the line - he was exceptionally good at that. Often, batsmen moves back (shifts weight to back foot) to play good length balls, that gives them a fraction of a second of extra time, Hick’s first movement was into driving position on front foot. This was extremely effective in County circuits where too many games often forced pacers to bowl within limit and wickets were also better for batting in general - easy on pace & bounce, not much sideway movements with lots of soft overs from medium pacers bowling length-line. Once set, Hick was the king of County cricket, particularly on that beautiful batting track at New Road, Worcester.
At international (Test) level, he was subject to fast & short hostile pace and top teams never allowed him to play in his comfort zone - kept pegging him on back foot until he got desperate. This was first exposed by WI pacers, particularly Ambrose, then Aussies & Pakistanis also exploited his weakness - a height of 6’3”+ didn’t help either in this regard. His ODI stats are much better than Test stats, and the reason was simple - by the time he started ODI career, limit was imposed on short bowling.
This was the same reason with Zaheer Abbas - he was the best County batsman of 1970s (when every contemporary great bar Gavaskar played there) - Zaheer scored over 20K FC runs for Gloster, at an average close to 60 .... at a time when in same seasons Viv & Greg barely touched 50 and his ODI stats are actually better than Viv - similar in numbers and includes runs against Viv’s bowlers.
Ramprakash is a system produced batsman whose drives were text book perfect and he could play every type of bowling equally good or bad), but he was just not tough enough mentally to fight it out at highest level. I believe this lack of confidence was again due to his weakness on back-foot - he was always subject to a barrage of short bowling which didn’t help him building confidence. He was given enough Tests (50+) to establish himself, but ended with an average in mid 20s. His ODI stats are even worse, though both at List A level, it was comparable to Hick. His FC/County stats are actually better than Hick and he lasted longer. At the last end of career, Ramprakash had few remarkable County seasons, but it was too late by then, didn’t get the call.
The third one in this group was Ian Bell - though comparatively much better Test record, but still I believe he underachieved - that cover drive demands better return.