The above is correct - a death should be registered in the name the person "used or was known by" at the time of death, and I suspect that has always been the case.
Nowadays, one of the questions the informant should be asked by the registrar is whether the deceased was ever known by, or used, any other name.
If they have, then the original name could be recorded as "formerly known as ", but the informant could choose not to have the previous name recorded ( or they may not even know about it).