I haven't read this, and I'm not a type theorist so this is kind of over my head, but my understanding is that you can have decidable dependent types if you add some constraints - see Liquid types (terrible name).
https://goto.ucsd.edu/~ucsdpl-blog/liquidtypes/2015/09/19/li...