Is there any size limitation to convert bson binary to base64?

I’m reading binaries for a collection, I got the order and the data is successfully populated, however, in a realm function, I want to read those binaries, convert them to base64 then concatenate the results. The issue that I got is that the string (the result) does not have the whole value, the original data is fine, so it takes me to the following question: is there a limitation to convert bson binary to base64 ? if so, is there any known workaround?

const base64String = await Promise.all(
    list.map(async (item) => {
      if (item.data) {
        try {
          const decodedData = await item.data.toBase64(); 
          return decodedData;
        } catch (error) {
          console.error("Error decoding data:", error);
          return null;
        }
      } else {
        console.error("Missing data in chunk:", chunk);
        return null;
      }
    })
  );

  const concatenatedBase64String = base64String.filter(Boolean).join("");

  console.log("concatenatedBase64String:", concatenatedBase64String);