I only had it the other way around, once. I understood everything crystal clear, but could not say anything. I don't know if it was a foreign language, or just such a state. There was no such thing as in the question.
It's all about the peculiarities of the perception of our psyche, and the effect of cannabinoids that act on the brain. Speech is controlled by one part of the brain, and this is generally a very specific and separate human activity.
What does the weed do? For memory, perception, attention and cognitive structures. What mechanisms are included to understand foreign speech? (in simple words) 1. Perception of the object of words. 2. "Transfer" of words from the zone of perception to the zone of memory. 3. "Transformation" of a word into your native language from memory. 4. "Transfer" to the cognitive zone. 5. Understanding the holistic structure of speech.
How does weed actually work? Everything becomes "brighter", perception becomes more sensitive (more sensitive). You begin to perceive each object in more detail, which means that more time is spent on it. It becomes more difficult to shift attention from one object to another. Because of this, it is very difficult to perceive each object as related to the previous one, and it becomes more difficult to perceive them all as something integral. In general, you start to be blunt.
And you yourself speak normally, because this function is generally separate from the entire process described above, and you have it automated since childhood.
Summary: understanding and speaking a foreign language are two different processes that drugs can affect in different ways.