Group Access not working for Custom modules!

I am using version 8.7. I set permissions for a custom module. I want to set the permission level, as shown below:

image

I created two users (UserA, UserB)

At the same time, I created two roles on the Role Management page, RoleA (fourth level) and RoleB (third level). The permissions of RoleA are set to Owner Access, and the permissions of RoleB are set to Group Access.

Each role here corresponds to a different Security Suite Group Management (SecurityA, SecurityB).

At the same time, SecurityA loads UserA, and SecurityB loads UserA and UserB.

Ideal situation:
UserA can only see UserA’s records
UserB can see UserA’s records in addition to his own records

Display situation:
UserB cannot see UserA’s records

Is there anything wrong with my settings?

Do you have both User A and User B in the same group? If not your desired outcome won’t work.

Found a problem, only new records can be seen, old records cannot be seen

Youll have to add the old records to your new groups. Its driven by the record. Groups are driven by what group the rrcord is in and roles are driven by who owns the record.