Asynchronous Fetch in Javascript

I need to make a call to a file named chiamata_preventivo.php, which takes about 10 minutes to respond. While this page is being processed, I would like to open a new tab to dashboard.php to allow the user to navigate while the request is being processed. The issue is that the call is blocking, and I’m unable to make it work with fetch() or an AJAX call.

Main file (this script is in the HTML head):

<script>
        document.addEventListener("DOMContentLoaded", async function() {
            try {
                const response = await fetch('chiamata_preventivo.php', {
                    method: 'POST',
                    headers: {
                        'Content-Type': 'application/json'
                    },
                    body: JSON.stringify({ datiJson: <?php echo $json; ?> })
                });
                const data = await response.json();
                console.log(data);

                // Open the dashboard in a new tab
                window.open("../../common_page/dashboard.php", "_blank");
            } catch (error) {
                alert('Error in request: ' + error);
            }
        });
    </script>

chiamata_preventivo.php

<?php
$_pageProfile = "*";
$nome_pagina = "chiamata_preventivo.php";

require_once $_SERVER['DOCUMENT_ROOT'] . '/common/database_connect.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/interfacce/bartolini/richiesta_bartolini.php';

header('Content-Type: application/json');

if ($_SERVER["REQUEST_METHOD"] == "POST") {
    $input = file_get_contents('php://input');
    $dati = json_decode($input, true);
    $json = $dati["datiJson"];

    $response = dispatchRequestRCA(json_encode($json));
    echo json_encode($response);
    die();
}
?>

Any solutions?