@Anonymous According to this comment, it is expected for the host to shut down on function timeouts but as covered in another issue, this isn't detected immediately, causing the 404.
Even if you have the max timeout set to 10 minutes (assuming consumption tier), it could still be possible that one of our executions is taking longer. If this is the case, you should be able to confirm the same in the logs as mentioned in the linked issue.