I can’t get the RTQ queries to work properly

There is a task to display a list of cards that need to be displayed with inifinite scroll and load data in portions, also there are filters with checkboxes, active filters I store an array of strings in the store, when the query is executed parameters of the page and filters are passed. I am struggling with the correct api configuration. If you don’t change parameters, everything works correctly and everything is ok, but when you start clicking checkboxes and changing filters you start to have problems. I have already played with the cache as I could and with serialisation of parameters but I can not solve the problem.
Help I am new to Redux.

This is ui component

export const ChooseProject = () => {
   const [page, setPage] = useState(1);
   const activeFilters = useStateSelector(s => s.filterProjectsReducer.activeProjectFilters);
   const { isLoading, data, error, isError, isFetching } = useGetProjectsQuery({
      page,
      filters: activeFilters,
   });

   const { data: total } = useGetProjectsLengthQuery({ filters: activeFilters });
   // const [fetchMore] = useLazyGetProjectsQuery();
   return (
      <Container sx={{ mt: 4 }}>
         <HeaderAction title="ОБЕРИ СВІЙ ПРОЕКТ" />
         <Box sx={{ my: 4 }}>
            <FeatureSortProjectButton />
            <Grid container spacing={6} mt={4}>
               <Grid id="projects" sx={{ maxWidth: "1200px" }} size="grow">
                  {isLoading ? (
                     <div>Load content....</div>
                  ) : (
                     <InfiniteScroll
                        dataLength={data ? data?.length : 0}
                        next={() => {
                           setPage(prev => prev + 1);
                        }}
                        hasMore={(data?.length as number) < total!}
                        loader={null}
                        endMessage={!isError && <p>There are no projects anymore</p>}
                     >
                        <SpaceColumnBetweenStack spacing={6}>
                           {data?.map(
                              ({
                                 id,
                                 complexity,
                                 description,
                                 network_project_type,
                                 project_image,
                                 project_type,
                                 skills_expertise,
                                 title,
                              }) => (
                                 <CardProject
                                    id={id}
                                    key={id}
                                    complexity={complexity}
                                    description={description}
                                    network_project_type={network_project_type}
                                    project_image={project_image}
                                    project_type={project_type}
                                    skills_expertise={skills_expertise}
                                    title={title}
                                 />
                              ),
                           )}
                           {isFetching && <p style={{ textAlign: "center" }}>Load more.....</p>}
                           {isError && <span>{error.data.toString()}</span>}
                        </SpaceColumnBetweenStack>
                     </InfiniteScroll>
                  )}
               </Grid>
               <Grid size={3}>
                  <FilterChooseProjects />
               </Grid>
            </Grid>
         </Box>
      </Container>
   );
};

This is api

import { baseApi } from "@/shared/redux/baseApi";
import { IProjectCard } from "@/entities/ProjectCard/ui/CardProject";

export const LIMIT_OF_DATA_PROJECTS = 5;

export const projectsApi = baseApi.injectEndpoints({
   endpoints: builder => ({
      getProjects: builder.query<
         IProjectCard[],
         { page?: number; limit?: number; filters?: string[] }
      >({
         query: ({ limit = LIMIT_OF_DATA_PROJECTS, page = 1, filters }) => ({
            url: "/projects",
            method: "GET",
            params: {
               page,
               limit,
               filter: filters?.join("|"),
            },
         }),
         serializeQueryArgs: ({ queryArgs }) => {
            const { filters, page } = queryArgs;
            return {filters}
            //return { page, filters };
         },
         merge: (currentCacheData, responseData) => {
            const mergedData = [...currentCacheData];
            responseData.forEach(project => {
               const existingProjectIndex = mergedData.findIndex(p => p.id === project.id);
               if (existingProjectIndex !== -1) {
                  mergedData[existingProjectIndex] = project;
               } else {
                  mergedData.push(project);
               }
            });
            return mergedData;
            // return [...currentCacheData, ...responseData];
         },
         
         providesTags: [{ type: "Projects", id: "all" }],
         forceRefetch: ({ currentArg, previousArg }) => currentArg !== previousArg,
      }),
      
      getProjectsLength: builder.query<number, { filters?: string[] }>({
         query: ({ filters }) => ({
            url: "/projects",
            params: {
               filter: filters?.join("|"),
            },
         }),

         transformResponse: (responseData: IProjectCard[]) => {
            return responseData.length;
         },
      }),
   }),
   
});

export const { useGetProjectsQuery, useGetProjectsLengthQuery, useLazyGetProjectsQuery } =
   projectsApi;

I tried changing serializeQueryArgs ,
I also tried to play with the merge function in different ways, I’ve been sitting here for a few days and I don’t know what to do(

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật