Assigning a device group to an RBAC role does not automatically filter the Devices page for those users. Instead, it limits actions the user can perform to only the devices in that group. The Devices list still shows untagged/all devices for usability, but attempting an action (like querying or changing settings) outside the assigned group is blocked. Similarly, device groups filter actions, not the UI list. This is why untagged devices appear. Effectively, AFAIK, there is currently no way to completely hide unassigned devices from the Devices list in the portal.
As a workaround, consider setting up dashboards filtered by device group (views filtered by device group).
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin