I think there is a misunderstanding of the hadith in question. The hadith you referred to is in Sahih Al-Bukhari without the mention of the Prophet ﷺ taking the sword, and is also documented in Riyad As-Salihin without a mention of the Prophet ﷺ putting the sword to the polytheist or that the polytheist accepted Islam. In both versions, the polytheist was released to go without being harmed or forced, and without accepting Islam.
The hadith you are referring to was documented in Sahih al-Bukhari » Book of Military Expeditions » Hadith 4135, but there is no mention of the part that the Prophet ﷺ said "On condition you testify that there is none worthy of worship but Allah and that I am His Messenger."
حَدَّثَنَا إِسْمَاعِيلُ، قَالَ حَدَّثَنِي أَخِي، عَنْ سُلَيْمَانَ، عَنْ مُحَمَّدِ بْنِ أَبِي عَتِيقٍ، عَنِ ابْنِ شِهَابٍ، عَنْ سِنَانِ بْنِ أَبِي سِنَانٍ الدُّؤَلِيِّ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ ـ رضى الله عنهما ـ أَخْبَرَهُ أَنَّهُ، غَزَا مَعَ رَسُولِ اللَّهِ صلى الله عليه وسلم قِبَلَ نَجْدٍ، فَلَمَّا قَفَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم قَفَلَ مَعَهُ، فَأَدْرَكَتْهُمُ الْقَائِلَةُ فِي وَادٍ كَثِيرِ الْعِضَاهِ، فَنَزَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم، وَتَفَرَّقَ النَّاسُ فِي الْعِضَاهِ يَسْتَظِلُّونَ بِالشَّجَرِ، وَنَزَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم تَحْتَ سَمُرَةٍ، فَعَلَّقَ بِهَا سَيْفَهُ، قَالَ جَابِرٌ فَنِمْنَا نَوْمَةً، ثُمَّ إِذَا رَسُولُ اللَّهِ صلى الله عليه وسلم يَدْعُونَا، فَجِئْنَاهُ فَإِذَا عِنْدَهُ أَعْرَابِيٌّ جَالِسٌ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " إِنَّ هَذَا اخْتَرَطَ سَيْفِي، وَأَنَا نَائِمٌ فَاسْتَيْقَظْتُ، وَهْوَ فِي يَدِهِ صَلْتًا، فَقَالَ لِي مَنْ يَمْنَعُكَ مِنِّي قُلْتُ اللَّهُ. فَهَا هُوَ ذَا جَالِسٌ ". ثُمَّ لَمْ يُعَاقِبْهُ رَسُولُ اللَّهِ صلى الله عليه وسلم
Narrated Jabir bin 'Abdullah: That he fought in a Ghazwa towards Najd along with Allah's Messenger (ﷺ) and when Allah's Messenger (ﷺ) returned, he too, returned along with him. The time of the afternoon nap overtook them when they were in a valley full of thorny trees. Allah's Messenger (ﷺ) dismounted and the people dispersed amongst the thorny trees, seeking the shade of the trees. Allah's Messenger (ﷺ) took shelter under a Samura tree and hung his sword on it. We slept for a while when Allah's Messenger (ﷺ) suddenly called us, and we went to him, to find a Bedouin sitting with him. Allah's Messenger (ﷺ) said, "This (Bedouin) took my sword out of its sheath while I was asleep. When I woke up, the naked sword was in his hand and he said to me, 'Who can save you from me?, I replied, 'Allah.' Now here he is sitting." Allah's Messenger (ﷺ) did not punish him (for that).
Similarly, in Sahih al-Bukhari » Book of Fighting for the Cause of Allah (Jihaad) » Hadith 2913, there is no mention said sentence.
The version of the hadith that has said phrase was documented in Riyad as-Salihin » The Book of Miscellany » Hadith 78 through Abu Bakr Al-Isma'ili, and in this version, the polytheist did not accept Islam, and there is no mention that the Prophet put the sword to the polytheist's neck, neither does the link in the question:
وفي رواية أبي بكر الإسماعيلى في صحيحه: قال: من يمنعك مني؟ قال : الله قال: فسقط السيف من يده، فأخذ رسول الله صلى الله عليه وسلم السيف فقال: من يمنعك مني؟ فقال كن خير آخذ، فقال تشهد أن لا إله إلا الله ، وأني رسول الله؟ قال: لا، ولكني أعاهدك أن لا أقاتلك ولا أكون مع قوم يقاتلونك، فخلى سبيله، فأتى أصحابه فقال: جئتكم من عند خير الناس
And in a narration of Abu Bakr Al-Isma'ili, the polytheist asked: "Who will protect you from me?" Messenger of Allah (ﷺ) replied, "Allah." As soon as he said this, the sword fell down from his hand and Messenger of Allah (ﷺ) catching the sword, asked him, "Who will protect you from me." He said, "Please forgive me." Messenger of Allah (ﷺ) said, "On condition you testify that there is none worthy of worship but Allah and that I am His Messenger." He said, "No, but I promise you that I shall not fight against you, nor shall I be with those who fight with you." The Prophet (ﷺ) let him go. He then went back to his companions and said: "I have come to you from one of the best of mankind."