When you press the "Re-run Pipeline" button on the UI, there is no connection between the previous Execution and the new one. There is no way to check which pipeline you are rerunning, only the inputs are copied.
It would be nice to reference that can be checked using JEXL at runtime, maybe something like
<+pipeline.previousExecution>
similar to how we have
<+pipeline.originalExecution>
during rollbacks.
I know this is more engineering work because they are different executions.