There are several out of the shelf solutions: LR8 from Microchip (formaly known as Supertex product) and NCP785 from ON-Semi. The last one is able to handle up to 700 volts at the input which is impressive.
Both components is very attractive to be used in my application. However, LR8 does not have enough voltage strength (I need to withstand 400 VAC = 625 VDC) and NCP785 is not easy to buy in my country (Russia).
One of the solutions is to put an external transistor like this:
However I think that it should be possible to add an external transistor to linear regulator (LP2981 in my case) without additional components (zener, resistors...) - this would be perfect as I need to reduce PCB size.
From my early engineering career I remember that the external transistor can be used to increase the current of the regulator, something like this:
Is it possible to do same thing to input voltage?