Ok, I figured it out. The solution is as follows:
<a href="<?php
$url_endpoint = get_permalink( $this->get_field('page_id.ID') );
$url_endpoint = parse_url( $url_endpoint );
$url_endpoint = $url_endpoint['path'];
echo $url_endpoint; ?>" class="button">Go to next product</a>
:)