So it turns out I was just unlucky twice and two defective regulators managed to get into my component pool. I have to stop ordering components from AliExpress
After I replaced all the regulators I encountered the same problem again - changing the PWM did not affect the LED and it illuminates constantly in low brightness , even with a cycle time of 0.
I turned to the BLF experts for help, but the solutions they offered me did not solve the problem:
I added a capacitor to filter the noise on the ATtiny’s voltage and even lowered the ATtiny’s frequency.
Unfortunately, lowering the frequency to 128KHz locked the ATtiny to burn and before I realized it, I changed to my second ATtiny and destroyed it too.
I was very desperate because I had no more ATtinys left to replace and I was already considering abandoning the project.
Finally, after some online research, I found a tip to change the frequency of the ISP’s clock and I was able to burn to the ATtiny again but I still haven’t solved the problem with the regulators.
I decided to desolder all the regulators from the circuit again and check them one by one until I found the faulty component and threw it away.
After all this struggle I soldered the working regulators back to the circuit for the third time and now it finally works properly.