This happens occasionally. I haven't figured out how to accurately reproduce it consistently.
Poorly written code can cause the VS Code to throw an error (error window pops up .. see image) instead of the code attempting to compile and throw a PLS error (what is expected).
The problem seems to be related to the “inline suggestion search” as I have seen a spinning icon instead of “{} PL/SQL” on occasion.
To attempt to reproduce, mismatch one of the inner most PL/SQL Block <<labels>> (eg change <<assertion01>>
to <<assertion03>>
). This is not consistent.
The odd part .. even after I undo the code, the VS Code error can still be thrown.

DB was 23.7.0.25.01 FREE on VirtualBox
code I was working on
create or replace
function assertion_test( a number, b number) return number
as
ret_val number;
begin
<<input_assertions>>
begin
<<assertion01>>
declare
dummy_rcd sys.dual%rowtype;
begin
select * into assertion01.dummy_rcd
from dual
where ( a < b ) is not false;
exception
when no_data_found then
raise value_error;
end assertion01;
end input_assertions;
<<work>>
begin
ret_val := a/b;
end work;
<<output_assertions>>
begin
<<assertion02>>
declare
dummy_rcd sys.dual%rowtype;
begin
select * into assertion02.dummy_rcd
from dual
where ( trunc(ret_val) = ret_val ) is not false;
exception
when no_data_found then
raise value_error;
end assertion02;
end output_assertions;
return ret_val;
end assertion_test;
/