It worked if I set capabilities when creating custom role.
function add_wp_custom_roles() {
add_role(
"bbp_member",
"Member",
[
"read"=>true,
"spectate"=>true,
"participate"=>true,
"read_private_forums"=>true,
"publish_replies"=>true,
"edit_replies"=>true,
]);
}
add_action("init", "add_wp_custom_roles");