You can do this be putting the it inside a box, i.e.
#lorem(12) #box($forall a in (A sect B)$) #lorem(12)
If you want this behaviour for all inline equations, you can do the following:
#show math.equation.where(block: false): box
In this case all such equations would automatically be wrapped by a box.