To clean-install Windows 98 using the Upgrade version, it would accept either 3.1x or 95 installation media. After the verification, it'll proceed to work exactly like the fully-purchased product version, no cruft from an older OS (since the older OS was never installed in the first place).
I know they continued doing this at least up until Windows Vista and 7. Helpful especially since Windows 2000 was a qualifying operating system for Vista upgrade, but a direct upgrade wasn't possible from 2000; it could directly upgrade from XP, though. Windows 7 would restrict the qualifying OSes to XP and Vista, and only allow direct upgrades from Vista. (Never tried newer versions of Windows, can't say what 8/10/11 do, but I have little reason to believe the practice has changed.)