React Query V5 infinite loop when using useEffect - TanStack