but I would have only expected this to affect the column being created by jsonb_path_query and not to remove the whole result set.
Except that is exactly what happens when a set-returning function is placed into the target-list and it produces zero rows.
You should not place set-returning functions into the target-list. They, like any other table, belong in the FROM clause. The LATERAL modifier was created for just this purpose.