Dwarves have a special trait, see PHB page 20:
Speed. Your base walking speed is 25 feet. Your speed is not reduced by wearing heavy armor.
It refers to the Chapter 5, see more information here – Does Heavy Armor reduce your speed?
If the Armor table shows “Str 13” or “Str 15” in the Strength column for an armor type, the armor reduces the wearer’s speed by 10 feet unless the wearer has a Strength score equal to or higher than the listed score.
However, under "Variant: Encumbrance", the PHB says:
The rules for lifting and carrying are intentionally simple. Here is a variant if you are looking for more detailed rules for determining how a character is hindered by the weight of equipment. When you use this variant, ignore the Strength column of the Armor table in chapter 5
Normally variant rules do not completely negate racial or class features. So how is the dwarven trait supposed to work in this case?
I found no mention of this issue in the books or sage advice, so you should make your own ruling.
We can see that both wearing heavy armor with low strength by the default rules and being encumbered by the optional rules reduces your speed by 10ft. If we treat these as equivalents, dwarves should never become encumbered because they wear armor. This leads to a pretty straightforward ruling: dwarves do not count the weight of armor they wear when calculating encumbrance.
This will also mean that they will reach heavily encumbered status "later" too, while under the original rules their carrying capacity is the same. So we add that the above ruling does not apply when checking whether they are heavily encumbered.