Yes,there are several trains which takes longer route & duration more & alternative train within state around 800–1000 km,also taking indirect route when already existing straight route exist
⭐From Tamilnadu
1) 16368/Banaras-Kanyakumari Kashi Tamil Sangam Express…from Perambur (Chennai to Kanyakumari longer route Perambur Arakkonam Chengalpattu Thanjavur Trichy total 880 km which 17 hours journey ..indirect route
212689/MGR Chennai Central-Nagercoil Weekly Express which takes longer route than shorter route via Karur,Trichy, Dindigul (Total 883 km,15 hours) one of the longest running train after Kashi Tamil Sangam Express
⭐From Karnataka
1)17307/Mysore-Bagalkot Basava Express (1017 km total 21 hours) via Bengaluru,Guntakal,Raichur,solapur then Bagalkot)
only train which travel circular route by passing through from Karnataka to other states via Andhra Pradesh & Maharashtra then again reach Karnataka
2)16565/Yesvantpur-Mangalore Central Weekly Express Via Bangarpet,Salem Palakkad 833km and takes 14 hours journey..
⭐from Maharashtra
1)The only within state running train which takes above 1000–1200 km is Maharashtra Express from Gondia to Kolhapur via Jalgaon,Manmad,Pune,Satara,total 1211 km,27 hours journey we have to sit.
2)Pune-Ajni Vande Bharat Express, Longest running Vande Bharat Express after New-Delhi Varanasi,which takes 881km & 12 hours journey and interesting fact is this train takes time full day and doesn't go back return on same day.
These are the trains which takes longer duration and taking longer route within same state…and other trains longest running train passes through several states.