The bug
In 20w15a command autocomplete was changed to also consider parts after an underscore. However, if you specify a namespace in the command you type, then command autocomplete will not include suggestions where the the text after the namespace (in the command) appears after an underscore (in the possible suggestion).
To reproduce
Using the optional "minecraft:" namespace
Type
/give @p dir
Notice that both "minecraft:dirt" and "minecraft:coarse_dirt" are suggested. ✔
Now type
/give @p minecraft:dir
Notice that "minecraft:coarse_dirt" is not suggested. ❌
Using a required namespace from a datapack
Download the "Equestrian Crafting" datapack from Vanilla Tweaks.
Put the datapack into the datapacks folder of a Minecraft world.
Open the Minecraft world.
Type
/recipe give @p equestrian_crafting:hors
Notice that nothing is suggested even though "equestrian_crafting:diamond_horse_armor", "equestrian_crafting:golden_horse_armor", and "equestrian_crafting:iron_horse_armor" all have "hors" after an underscore. ❌
I discovered this while testing MC-182309.