The problem is less inside json_set, as I assumed in the question, it is more in the conjunction with http_post() from pgsql-http. If I cast the jsonb object to text and change that http_post() call to this:
CREATE OR REPLACE FUNCTION public.webhook()
RETURNS trigger
LANGUAGE plpgsql
AS $function$
BEGIN
PERFORM status FROM
http_post('https://automate.nrkt.enerkite.com/webhook-test/redmine',
jsonb_build_object( 'action',TG_OP,
'table',TG_TABLE_NAME,
'value',to_jsonb(NEW.*))::text,
'application/json');
RETURN NULL;
END;
$function$
;
it works. Thank You all for helping. Zegarek, you pointed me in the right direction by You debug mechanism, which showed, taht my problem was not where I thought.