I don’t know if it’s the best way, but my method is that I have my transition as a preset with a linear wipe effect, turned off, but saved as part of it. With an expression to control the wipe set up already.
When I want a transition, I add it from Effects and Presets (which creates a new layer for it), and then I copy the linear wipe to the layer I’m transition to. And then relink the linear wipe’s expression to the transition layer.
There’s probably a “better” way using Essential Graphics, but this works well enough for me