You need to set it on the Role model. Or selec the columns you want
User::with('roles:id,name')->all();
or change it after getting it in the controller https://laravel.com/docs/9.x/eloquent-serialization#temporarily-modifying-attribute-visibility.
Or use an API resource : https://laravel.com/docs/9.x/eloquent-resources