As a student of religious history I am currently reading about early Christian history. At some point in the 4th century Rome is in decline as a centre of power and politics and 402 the capital of the Western Roman Empire is moved to Ravenna. Constantinople had already ben a major power centre and arguably the most important Roman city for about a century. But what exactly caused all of this? It never fully became clear to me how Rome's decline as a city really started, and it seems in odd contrasts with its religious prestige under popes such as Damasus and Leo I.
So this is a complex--and very good!--question that I will try to tackle from the church's perspective with a little bit of Roman politics sprinkled in. If someone with more expertise on Roman history can complement this answer that would probably be more helpful.
The first thing we must note is that at this point in Roman--and "Roman Catholic"--history the church is not completely imbued into Roman politics. The maneuvering of capital cities and cities of influence had little to do with this infantile form of the papacy, although there were religious motivations behind some of them.
We have to start, as any conversation regarding the dissolution of the unified Roman Empire, with the tetrarchy. Briefly, Diocletian splits the empire into two--East and West--and institutes Maximillian as augustus of the West with Constantius Chlorus (Constantine The Great's father) as his caesar. Diocletian, originally the single emperor of the entire realm, chooses to rule from Nicomedia, while the other three leaders chose cities that were not Rome (for reasons better explored by an expert in this event but having very little to do with a religion that was not yet established and still being persecuted).
So already from before Constantine's conversion we see Rome decline in its prestige and influence as the single capital of the Roman Empire; however, despite any cities serving as locations of operation for various augusti and caesars, Rome still held great influence and power. This will eventually lead to Constantine consolidating power, moving his capital from Trier to Constantinople, the empire further being divided after his death, and eventually the capital being moved to Ravenna for strategic reasons in light of the Visigoth invasions. We will come back around to this.
So let's try to trace the church's role throughout this 100+ years of turmoil. Diocletian--who effectively splits the kingdom into four regions--is somewhat infamous for his religious persecutions (more influenced by Galerius than Diocletian's own personal beliefs). It is important to remember here that pre-Constantine the Bishops of Rome had very little institutional influence to Christianity or the Roman Empire at large, something I outlined in this post. Ascribing pontifical power as influential to the Roman state is a bit anachronistic, as this religious-political intersection is much more prevalent and meaningful in the Middle Ages.
Despite Roman--that is, the citizens of the city of Rome--opposition to Constantine using Christianity as an impetus to reunify and strengthen the struggling Roman Empire, Constantine nevertheless moves to Byzantium and establishes a state built on the foundation of religious tolerance. This led, to put it briefly, to the Western half of the empire's eventual, albeit relatively slow, demise at the hands of "barbarian" invaders.
It's important to note that in the 4th and 5th centuries the Roman state had much more of an influence on Christianity than vice-versa. Much of Christianity changed because of Constantine's conversion: it is in this time we see the rise of monasticism (as a substitution for martyrdom), heresy and polemics, the aestheticism of worship (due to imperial influences), and pilgrimages. To put it simply, these changes were often viewed with disapproval from the church leaders, but undoubtably aided in the rise of the papacy as a political institution eventually.
Which brings us, finally, to 402 and the popes that you mention. As I mentioned above, there is very little evidence, if any, that Christians--let alone popes--had an impact on the various capital shifts and splits of the preceding 100 years. Leo arguably held great influence as a religious leader in the city, but this comes almost 50 years after the capital's move to Ravenna. As I wrote in another post:
Leo "the Great," who some consider to be the first Pope in the modern sense, was able to spread his theological doctrines across Christendom and assert his influence mostly because of the political turmoil of the time. When Attila invaded Italy in 452, it was Leo who met Attila and, somehow, convinced the Hun not to sack the city (Christian “tradition” speaks of Saints Peter and Paul walking up to the parley with Leo, intimidating Attila). When the Vandals did sack Rome in 455, it was Leo who was able to negotiate a stop to the burning of the city. To make a long story short, Leo used these events and others to propagate himself as a political authority in Rome, and for the purpose of this question he marks the first in the line of historically-documented Popes (capital P) that we have.
Pope Damasus I is an interesting case. He is most famous for presiding over the Council of Rome which determined the official canon for the Old and New Testaments. Damasus rose to power with much controversy, being accused of murder and adultery, yet was able to actively combat heretical schisms in his alliances with the bishops of the east. This is a key point here--although at this point in Church History we are starting to see the imperialistic and institutional underbelly of the Church, there is still no such thing as a Roman Catholic Church in its religious homogeny. While Damasus gained many admirers (and detractors) in the city of Rome as an important religious leader of what was effectively the state religion of the Roman Empire, Christianity and Roman politics were not so intertwined that the placement of the church would influence the location of capitals during a time of devastating war. In other words, Damasus was a controversial pope as it was, barely gaining ubiquitous support from Christian laypeople, let alone being able to truly influence the Emperors.
Arguably, this influence came with Leo. We should not underemphasize Rome's importance--however symbolic--to the empire, especially as it was being invaded. Ravenna seemed to be of less importance to barbaric invaders than Rome, and it was Leo's confrontation with Attila and his intercession with Vandal invaders in 455 that seemed to set the course for the church's relationship with the empire moving forward. But still, the church was more used by its political overlords than truly holding political power in Rome, most notably seen in the Arian controversy and the 5th century east-west schism.
TLDR: The question is not so much why Rome declined when there was a strong religious presence in the city but rather how the new state church was used by various groups to maneuver the political upheaval of the 4th and 5th centuries. Most establishment of "capitals" was made for reasons other than what would be the best city to establish an Apostolic See. The fall of the Roman Empire occurred in light of many factors, and while Christianity was a large part in the everyday life and politics of this time, most historians today hold that it did not have much influence or impact, ultimately, in the dissolution of the Western Roman Empire (nor did it have an ability to save it).
Professor Paul Freedman of Yale has a great series of lectures on this very subject (covering a much wider range of time) that are available as a podcast called Early Middle Ages by Open Yale courses. I would highly recommend a listen.
Otherwise, my sources were:
The Story of Christianity by Justo Gonzalez
Divine Heiress: The Virgin Mary and the Making of Christian Constantinople by Vasiliki Limberis