Introduction Antiretroviral therapy (ART) reduces morbidity and mortality due to human immunodeficiency virus (HIV) infection. The complexity and time-consuming processes, particularly in drug approvals, have contributed to a major challenge to the ongoing success of antiretroviral treatment programs among children and adolescents. In 2019, Tanzania adopted DTG as a first-, second-line and third-line treatment for CALHIV on ART after being approved by the World Health Organisation (WHO). DTG treatment has highly potent antiviral activity, a high genetic barrier to resistance, and a high safety profile. This study aimed to determine HIV viral suppression and associated factors among CALHIV on DTG-based ART in Tanzania Mainland. Methods This was a retrospective cohort analysis among children and adolescents living with HIV who were on a DTG-based regimen in Tanzania Mainland between 2019 and 2021. The study utilized routinely collected data from Tanzania Care and Treatment Centres (CTC). We analysed data using STATA version 15 software. We calculated the prevalence of viral suppression by taking the number of children and adolescents with <1000 copies/ml overall study participants. A mixed effect generalized linear model with Poisson distribution and log link function with robust estimator determined the factors associated with HIV viral suppression on a DTG-based regimen. Results A total of 63,453 CALHIV on a DTG-based regimen were analysed. The proportion of viral suppression was 91.64%. Overall, 66.19% of previously unsuppressed individuals became suppressed and 88.45% of previously suppressed remained suppressed. Factors leading to lower chances of viral suppression were age 10-14 years (aRR: 0.98; 95%CI: 0.97-0.99), previously unsuppressed prior to starting DTG (aRR: 0.92; 95%CI: 0.91-0.93), duration on ART more than 24 months (aRR: 0.96; 95%CI: 0.94-0.97), not retained in care (aRR: 0.83; 95% CI: 0.77-0.89), severe malnutrition (aRR:0.77; 95%CI: 0.69-0.94) and coastal zone (aRR: 0.98; 95% CI: 0.96-0.99), while those in WHO stage I (aRR: 1.03; 95%CI: 1.01-1.04) and ever received a multi-month prescription (aRR: 1.25; 95% CI: 1.23-1.28) had a higher chance of viral suppression. Conclusions The findings support the broad use of DTG-based regimens for eligible CALHIV. Especially those in baseline WHO stage I and those who received the multi-month prescriptions were more likely to achieve viral load suppression. Programs should improve strategies to maintain CALHIV retention in care with interventions like the promotion of teen clubs and teams.