The real issue is that the script is not sending a reliable 200 response, which could happen at the beginning if it runs independently, or after the 90 seconds if the POST request needs the output. I don't know the specifics here, but such a long response time is usually a sign that the work should be handled in the background, with separate requests to start and check on it.
If one really needs to wait right until the timeout, likely the only thing that could be done to prevent this low-level "try again" feature would be to abort the HTTP request right before it happens:
setTimeout(() => {
if (xhttp.status !== 200) {
xhttp.abort();
console.log('Aborted before');
}
}, 179000); // 179 seconds, may need to adjust
Note that this will trigger error events and may not stop already-initiated processes like file uploads. The Fetch API has similar functionality in the form of the recent AbortSignal; behavior may vary.