Context
Context is always important in understanding which tense to choose.
In the explanation cited by the OP, an important element was missing, the question that preceded the two responses:
Q: "How long has it been raining?"
A1: It has been raining for two hours [and I don't expect it to stop soon].
A2: It has rained for two hours [and will likely continue to do so in the future].
It is already raining when the speaker asks their question. Presumably the circumstances tell us that rain has been falling for a significant amount of time, the continuous tense emphasises the continuity of the action, in this case the rainfall.
Both the responses are appropriate, and their meanings the same: it started to rain two hours ago. The user's interpretation within the square brackets are not really different from one another. In the first, the user expresses directly their opinion (I don't expect it to stop soon). In the second, it is unclear what or who suggests that it will continue to rain for sometime (and will likely continue to do so …).
For the difference between Present Perfect and Present Perfect Continuous, I warmly recommend that the user reads the concise answer written by the EL&U user Barrie England, which has also helped me in the past.
What is Similar?
The Present Perfect and the Present Perfect Continuous tense are often interchangeable when we want to express an action that continues to the present.
Present Perfect Continuous for Uncompleted Actions or Events
We use this tense to express the idea of an action in progress and when we want to mention the length of its duration. We use the PPC with time expressions that begin with either since or for, or with the question How long...?
For example:
- We've been driving for hours
- I've been writing this essay since this morning
- How long has it been raining?
Present Perfect for Uncompleted Actions or Events
Like the PPC we can use the Present Perfect to talk about an action in progress and its duration. Like the PPC we use the PP with time expressions that begin with for, since; or the question How long...?
Either tense can be used to describe facts or general truths
- The [name of army] have fought since 2014
- The [name of army] have been fighting since 2014
- How long have they been at war?
- How long has the war been going?
Sometimes when the duration is relatively long-term, speakers will prefer the PP tense over the PPC
- Present Perfect: I've worked here most of my life (i.e. long term)
- PP Continuous: I've been working here for just a few weeks (i.e. short term)
Adapted from Grammar for English Language Teachers (Second edition) by Martin Parrott