With great difficulty. I'm half-joking because I'm not totally sure, but the first observation is that DSM-IV also used these brackets, so the ICD-10 isn't alone.
The DSM-IV definition utilizes four degrees of severity that reflect the level of intellectual impairment: IQ levels between 50–55 to approximately 70 characterize mild mental retardation, 35—40 to 50–55 characterize moderate mental retardation, 20–25 to 35–40 characterize severe mental retardation, and IQ levels below 20–25 characterize profound mental retardation.
As far as actually testing the profound levels of retardation, it seem to me that alternative tests might be used in practice, e.g. a 2018 Texas HHS guideline says:
In some situations, an individual’s limitations may be so extensive that a full scale IQ
score cannot be obtained from a standardized intelligence test. In these situations, an
estimate of the individual’s IQ score, or, IQ score equivalent should be stated with clinical
justification. For example, if an individual’s ability to comprehend oral instruction or
visual demonstration is not adequate for a formal appraisal of general intellectual
functioning, the use of an Adaptive Behavior Composite (e.g., provided by the VABS)
may serve as an estimate of the individual’s intellectual functioning when accompanied
by a clinical justification explained in the DID report. However, not all measures of
adaptive behavior (e.g., ABAS, ICAP, and SIB) are appropriate for establishing an IQ
VABS is the Vineland Adaptive Behavior Scales; there's a reasonably cited paper by Bölte and Poustka (2002) correlating the ABC subscale of that with IQ < 70 (which is measured on the WISC-R/WAIS-R scale). But it also notes that the because of floor effects with WISC/WAIS we can't be certain that the substitute is really appropriate. It also cites some other papers some of which disagreed with this idea of substituting VABS for IQ.
The ICD-11 has moved away from merely using the IQ as discriminator, but has kept it. The DSM-5 was a little bolder:
DSM-5 abandoned specific IQ scores as a diagnostic criterion, although it retained the general notion of functioning two or more standard deviations below the general population.
As the Texas guideline explains further:
the DSM-5 (pages 33-36)
is the first edition to classify level of severity based on adaptive functioning rather than IQ
score. The DSM-5 explains that “the various levels of severity are defined on the basis of
adaptive functioning, and not IQ scores, because it is adaptive functioning that determines
the level of supports required.” In other words, the DSM-5 recognizes that adaptive functioning has greater practical significance because it is a better indicator of the
individual’s ability to function in society.
And Texas has basically adopted the DSM-5 in this regard, classifying ability by an (approved) ABL test, of which there are several, but since that's not the main topic here... I won't detail that any further.