drop postgresql schema public without losing extensions
I question your desire to routinely drop the public schema, but it should be no problem if you do it like this:

create a new schema extension and put it on the search_path

use CREATE EXTENSION ... SCHEMA extension to create the extension objects in that schema


I personally use the public schema for extensions and put my data in a different schema.