Zend certified PHP/Magento developer

Sorting products

I have a multistore built with Magento 2.4.I don’t know if does it matter but I also have installed Manadev. I tried to sort the products by price but it’s like I sort them by a random order. When I tried by name it was perfectly fine. After that I put a custom module built for a single store and for that store it’s working fine but here the same situation. Everything good if I sort by name but if I sort by price is wrong. The same situation for category page and for search page.

$currentOrder = $subject->getCurrentOrder();
        $result = $proceed($collection);

        if ($currentOrder) {
            if ($currentOrder == 'price_asc') {
                $subject->getCollection()->setOrder('price', 'asc');
            } elseif ($currentOrder == 'price_desc') {
                $subject->getCollection()->setOrder('price', 'desc');
            } elseif ($currentOrder == 'name_asc') {
                $subject->getCollection()->setOrder('name', 'asc');
            } elseif ($currentOrder == 'name_desc') {
                $subject->getCollection()->setOrder('name', 'desc');
            }
        }

        return $result;

I have to put store id somewhere or what I have to do? I also sort by product id, by weight everything works fine but when I try by price no. I saw in admin that, for example, weight attribute is global and price is for store.