Self-powered Attiny13 with 2N2222

Am I missing something ?

In addition to the other problems, you need an appropriate base resistor for the transistor.

That omission will sooner or later destroy the ATTiny chip.