Peace be upon you. It is not possible to definitively state what will happen in the future, as it is part of the unseen and open to all possibilities. It is conceivable that Imam Mahdi (AS) could disable modern weapons and triumph over his enemies with the sword, which aligns with the apparent meanings in the narrations that mention the sword and similar terms.
However, it is also possible that he will fight with the weapons of his time or even possess more advanced technology, as indicated in some narrations. The use of the term 'sword' in these narrations may symbolize warfare in general, especially since it refers to the weapon of that era. It would be challenging to communicate the names and descriptions of modern weapons to people of that time, as they would find them unimaginable, let alone believable.
Some narrations have described the characteristics of the Imam's swords and those of his companions, which could be interpreted as resembling the features of modern smart and advanced weapons. For example, it is mentioned that the Imam's sword recognizes the enemies of God and kills them, while sparing the supporters of God.
As for the sword of Zulfiqar, it symbolizes certain principles and goals, and its presence with the Imam may serve to illustrate the path and banner, even if it is not used in battle, similar to all legacies of leadership.
In conclusion, it is more logical and reasonable to assume that the Imam (AS) will fight with the weapons of his time rather than with ancient weapons. We can interpret the narrations that mention the sword in a way that aligns with this understanding. The miraculous disabling of advanced weapons would render any need for war unnecessary. It is clear that the Imam (AS) will not come with miracles of this nature; rather, he seeks victory through the will, determination, patience, and steadfastness of the believers. Otherwise, he would not have been in occultation or could have appeared long ago. And Allah knows best.
May you be successful in all good.