If you use dkms all you need is linux-headers and linux-lts-headers for the dkms driver to work on both kernels.
Also, I am not shure if you need to do mkinitcpio as endeavouros uses dracut per default, introduced all the way back in 2022:
So you shouldn’t need mkinitcpio, unless you have it for some reason. (which I really doubt you have )