Yes, this happens for me too, and has been painful in the past. However I don't believe this is a bug. It is a PL/SQL beautifier, not a SQL beautifier. A create or replace DDL isn't a part of PL/SQL.

I do the same as above, I highlight the SELECT part and beautify that.

It would be a nice change to have the beautifier work on SQL scripts too however I have no complaints. The beautifier is by far the best feature of PLSD.