Decentralize data access in v8 SuiteCRM API

Hello everyone, I am currently facing a pressing issue related to the v8 API in SuiteCRM. Specifically, I am developing an application using SuiteCRM’s API, but I’m puzzled as to why when I use two different accounts with separate data permissions, the API returns the same results for both accounts, and there is no apparent data segregation. I have extensively tested the API, and I suspect the issue may be within SuiteCRM itself. That’s why I’m posting this to seek assistance! Please, help me .

$where = accounts.deleted = ‘0’.$wh.$sea.$myAccount;
$lead = new Account();
$query = $lead->create_new_list_query(accounts.date_entered DESC,$where,array());
$query = $query. order by accounts.date_entered DESC;
$queryCount = select count(accounts.id) as num from accounts inner join ($query) as account on accounts.id = account.id where accounts.deleted = ‘0’;
$resCount = $db->query($queryCount);
$rowCount = $db->fetchByAssoc($resCount);