DALI deterministic commissioning
There are many control systems on the market that solve this problem by retaining the list of assigned short addresses (and a mapping to the higher level system addresses, in your case MQTT) in non volatile memory of the master eg. EEPROM, Flash, battery backed RAM. You don't have to re-randomise/assign short addresses on every power on of the master, which is not the intended system design for DALI anyway, this is meant to be a one-off commissioning step. There is a defined list (Table 14 in IEC63286-102) of settings in the control gear (slaves/LED drivers) which must retain their values over power cycles and includes the short address.

One of the changes between Ed 2 and Ed 1 of IEC 62386 is that the YES response has been defined to be the short address, if assigned, or MASK (0xFF) if not. However, this is of limited use to you because although it means that you could replace the power up randomisation run with scan of 0-63 short addresses using any query that would return YES, you could do that anyway with Ed 1 control gear using QUERY MISSING SHORT ADDRESS (opcode 0x96).

For many years, deterministic commissioning was not possible in general, because there was no unique unchanging identifier which could be relied on being present in all control gear. DALI was originally specified in IEC 60929 Annex E.4 (sometimes this version of DALI is referred to as Ed 0) which had no concept of a hard coded unique identifier, probably to allow cheap mass production of identical units. Thus the randomisation process was required to distinguish between the units at commissioning time.

Whilst unique identifiers were a requirement of IEC62386-102 Ed 1 when memory banks were introduced, this was not enforced by the DALI logo registration process and some manufacturers managed to get away without them (also sometimes without valid GTINs either). Edition 2 and the DALI-2 logo certification process strictly requires the unique identifiers and valid GTINs in memory bank 0, so if you are using control gear listed products you can rely on that feature.

But because you can only read memory bank 0 by using short-addressed commands, you have to adopt a process where you assign short addresses temporarily while you read the memory bank, then reassign them. (I mean on a typical bus situation with multiple control gears. There is no restriction on which addressing modes work with most of the commands, including reading the memory bank, but group and broadcast addressing are not much use here because of collisions, except in special cases eg you could legitimately use broadcast if you only attach/power up one control gear at a time).

To ensure deterministic addressing works every time, you need to take into account the fact that the control gear serial number only has to be unique per GTIN (manufactured type) so you must also read the GTINs. If you just relied on the serial numbers you could occasionally get collisions, although it would be rare with maximum 64 units in a 32 bit address space. Whilst you can have collisions in the 24 bit random address space you can re-randomise to resolve it, but you could not do similar with the hard coded serial numbers.