The select statements in the cursors need to be qualified by an alias; it's not a format issue.
Below is an example file with a very simple anonymous block and a sample cursor. If you run formatter on this, it won't work. If you comment out the 'OPEN' statement and run again, it will format. Making you 'think' it's a formatter issue. If you uncomment the OPEN line, and then qualify it by putting an alias on it, then it'll work (for example, add 'x' or 'as x' after the last ) and before the semicolon, and then qualify each column (not needed, but it's good syntax to do it that way).
/* Formatted on 7/16/2018 9:05:27 AM (QP5 v5.333) */
declare
begin
OPEN results_ref FOR
SELECT refid,
advisoryid,
status_code,
err_id,
err_code,
err_scope,
err_message
FROM JSON_TABLE (
p_resp,
'$.createResponse.creates.create[*]'
COLUMNS (refid VARCHAR2 (300 CHAR) PATH '$."@id"',
advisoryid VARCHAR2 (300 CHAR) PATH '$."@advisoryId"', -- is this column necessary?
status_code VARCHAR2 (3 CHAR) PATH '$."@statusCode"',
err_id VARCHAR2 (4000) PATH '$.error."@id"',
err_code VARCHAR2 (3 CHAR) PATH '$.error.code',
err_scope VARCHAR2 (4000) PATH '$.error.scope',
err_message VARCHAR2 (4000) PATH '$.error.message'));
/* Formatted on 7/16/2018 9:13:05 AM (QP5 v5.333) */
DECLARE
BEGIN
--OPEN results_ref FOR
SELECT x.refid,
x.advisoryid,
x.status_code,
x.err_id,
x.err_code,
x.err_scope,
x.err_message
FROM JSON_TABLE (
p_resp,
'$.createResponse.creates.create[*]'
COLUMNS (
refid VARCHAR2 (300 CHAR) PATH '$."@id"',
advisoryid VARCHAR2 (300 CHAR) PATH '$."@advisoryId"', -- is this column necessary?
status_code VARCHAR2 (3 CHAR) PATH '$."@statusCode"',
err_id VARCHAR2 (4000) PATH '$.error."@id"',
err_code VARCHAR2 (3 CHAR) PATH '$.error.code',
err_scope VARCHAR2 (4000) PATH '$.error.scope',
err_message VARCHAR2 (4000) PATH '$.error.message')) x;
END;