For people reading this thread in attempts to find a solution there was a proposed solution from Khadas team members in another thread posted later and it is to add “pci=pcie_bus_perf” to the kernel cmdline in /boot/Env.txt.
Here is the link to the aforementioned thread:
https://forum.khadas.com/t/ubuntu-desktop-5-12-screen-flickering-issue-with-nvme/