What rule should I add to Firestore DB for not override the existing data in the same array if it has the same value? [duplicate]

If I add the same data inside the same array in Firestore, it not creates more indexes in the array because it has the same data.

I want it to create more indexed when the same data is entered inside the array.

for example:

enter image description here

expected result:

expected result

code:

// collection reference
const collectionRef = collection(db, 'exercises data');
// submit function to add the exercises data
const handleSubmit = async (e) => {
    e.preventDefault();
    const usr = auth.currentUser;
    await setDoc(doc(collectionRef, usr.uid), {
        exercise: arrayUnion(exercise),
        sets: arrayUnion(Number(sets)),
        reps: arrayUnion(Number(reps)),
    }, { merge: true })
}