Passing data from after_submission action to the confirmation filter in gravity forms?

A hacky way round just for this situation is to just to get the latest create post. Not ideal but works as long no one creates an order within milliseconds of each other.

public function order_confirmation( $confirmation, $form, $entry, $ajax ) {

    // get latest created order
    $order = get_posts([
        'post_type' => 'purchase-order',
        'numberposts' => 1
    ]);

    // update redirect to order
    $confirmation = array( 'redirect' => get_permalink($order[0]->ID) );

    // return confirmation
    return $confirmation;

}