Yeah, this is perfectly normal and expected behavior.
When you call $request->session()->invalidate(), Laravel flushes the current session data and immediately regenerates a fresh session ID for security (preventing session fixation attacks). Since the user is now logged out, that new session belongs to a guest which is why you see the new record with a null (or empty string) user_id.
The reason your old session record (user_id = 1) is still sitting in the database is because Laravel handles database session cleanup via a lottery-based garbage collection process under the hood (config('session.lottery')). It doesn't always run a hard DELETE query on the old row at the exact millisecond of logout. In a testing environment, that garbage collection lifecycle rarely triggers.
Don't assert against the raw database row count for sessions because of framework quirks like this. Your $this->assertGuest() check is already the correct and most reliable way to test that the logout was successful.