LED Shim and Kali Linux

I am trying to get the Led Shim woring correctly with a Raspberry Pi 4 8GB running Kali Linux.
I have followed instruction from the following website

Everything appears to work fine, except for the rainbow…py file.
It starts fine with the odd led not working and then gradually gets worse, (see attached image


Appreciate if anyone can advise how to fix this issue.

You may need to edit /boot/config.txt.
The dtparam needs to have a baud rate of 400000 or less for LED Shim to work.

Uncomment some or all of these to enable the optional hardware interfaces