@llarsson , I apologize for the delay in my response. It took me some time as was busy trying to find the right answer for you to help you further with your query. Based on the internal discussions, I would say that, without session the logout redirect fails, since otherwise, it's an attack vector for open redirects. If we would use the request "https://login.microsoftonline.com/common/oauth2/v2.0/logout?post_logout_redirect_uri=https%3A%2F%2Flocalhost%2Fmyapp%2Flogout%2F%3F&client_id=<...>" without a session, it would like take you to the page that says, "Successfully logged out", but it won't redirect, as AAD, won't just redirect without a proper session since that's not a safe practice.
If there is no session, no redirects happen, but if there is a session, AAD does redirect the user to the post_redirect_uri as mentioned in the request.
Regarding the race condition you mentioned, ideally, there won't be any race condition as AAD does remember the session that it just deleted. There is a race condition if multiple apps all attempt to sign out at the same time, but that's not something that happens.
Hope this helps.
Do let us know if this helps and if there are any more queries around this, please do let us know so that we can help you further. Also, please do not forget to accept the response as Answer; if the above response helped in answering your query.