How to add the “page” post type to Recent Activity widget displayed in admin?

Add page post type to your code (tested):

add_filter( 'dashboard_recent_posts_query_args', function(array $queryArgs) {
    $postTypes = get_post_types([
        'public'          => true,
        'capability_type' => 'post',
    ]);

   $postTypes[] = 'page';

    if ( is_array( $postTypes ) ) {
        $queryArgs['post_type'] = $postTypes;
    }

    return $queryArgs;
}, 15 );

The reason your original code did not include pages is because pages have their own separate capability type: edit_page instead of edit_post.