Yes, The behaviour changes after the parameter are used for the first time. This could be a problem if the connection is reused (pool)
RESET/DISCARD also not bringing back the original behaviour.
--Please test this on a fresh connection
--Check the status before the first transaction
select current_setting('custom.a',true),current_setting('custom.a',true) is null, current_setting('custom.a',true)='';
--First transaction where the parameter is set at the transaction level
BEGIN;
SELECT set_config('custom.a', 'vv', true);
COMMIT;
--Reset
RESET ALL;
DISCARD ALL;
--Check the status after the first transaction
select current_setting('custom.a',true),current_setting('custom.a',true) is null, current_setting('custom.a',true)='';
-Jobin