The code has been recreated in all Super Mario All-Stars versions from scratch. In the Japanese version of SMB3 for the NES, when you are hurt and not Small Mario, you always return all the way back to Small Mario.
If you wear Kuribo’s Shoe and get hit, you are also reverted to Small Mario.
ROM / ISO Information:
When editing SMB3 for SMAS using SMB3 Workshop, it must use a x200 byte Super NES header. These patches for the Super Mario-All Stars version requires a header.