afterEach(() => server.resetHandlers())afterEach(() => server.resetHandlers()) is missing. server.use adds runtime handlers in front of the others, and they stay until you reset them. resetHandlers() removes them and goes back to the initial handlers. The tempting server.close() option is wrong. listen and close belong in beforeAll and afterAll. clearAllMocks is wrong because it doesn't touch MSW.
Read more