Multiple select with comparing objects not working properly

I am trying to use compare with function with multiple selection in ionic 5.
Binding is working properly, but when I open the options alert there is nothing selected, even if the selected values result correct in the object.
If I use single select this works correctly, but with multiple selection the selected values are not checked in the alert.
Here is my html code:

Attributes {{}}

And this is my compareWith function (that works according to logs that I’ve checked):
compareWithFn = (o1, o2) => { return o1 && o2 ? === : o1 === o2; }

Anyone has idea why this is happening?