Depending on the result you want, you can either use a different approach to the original issue:
#outline(target: math.equation)
#set math.equation(numbering: "|1")
#show math.equation.where(block: true): set block(inset: (right: 1.5cm))
$ x := sqrt(5) $
This will not left-align all the numberings (like a constant-width numbering box would) but instead inset the numberings from the right.
Another approach would be using the state-outline trick described in another answer.