Hey there,
This could be an issue with caching or a conflict with other plugins.
Important: I would advise not to assign any particular capabilities to the group(s) involved, these are not needed if you restrict access to pages based on groups as shown on the Access Control documentation pages. Actually make sure you do not inadvertently open up permissions that normal users should not have by assigned capabilities to those groups.
Here’s what I would recommend to do so you understand how this works normally:
1. Disable all non-essential plugins, including any caching plugins on your staging site.
2. Create a new group “Test”
3. Create a new page and call it “Test Page”
4. Set the “Test” group restricting access to the “Test Page”
5. Create a new user called “Test User” and assign that user to the “Test” group
6. Test access to the page: use a different browser and try to access the “Test Page” => should yield “not found”
7. Now log in as the “Test User” and try to access the “Test Page” => should show the restricted page
That’s how you can make sure you understand how it’s supposed to work and test it. Now go ahead and enable other plugins individually while testing, see if there’s a difference between the expected results and what you get when those other plugins are enabled. If anything changes, you might be on to a conflict. Also check you caching plugin to see if any of its settings might be related to how cached content is served to plain visitors vs users who are logged in.
Keeping this open to see what you find out …