These verses relate to the polytheists. They used to avert Muslims away from Islam. Therefore, the verse has a clear reason of revelation, and it is not absolute.
(وَقَاتِلُوهُمْ حَتَّىٰ لَا تَكُونَ فِتْنَةٌ) (Fight them until there is no [more] fitnah..): They wanted to persecute the Muslims, prevent them from embracing Islam and abuse them.
( وَيَكُونَ الدِّينُ لِلَّهِ) (and [until] worship is [acknowledged to be] for Allah): Hence, you do not force people to religion, but protect the freedom of people to choose the religion, this is the protection of freedom of choice.
( فَإِنِ انتَهَوْا فَلَا عُدْوَانَ إِلَّا عَلَى الظَّالِمِينَ) (But if they cease, then there is to be no aggression except against the oppressors.): If they stop fighting the believers, then cease warfare against them.
( فَلَا عُدْوَانَ إِلَّا َ) (then there is to be no aggression except ….): This linguistic expression called in Arabic (verbal Hypallage); meaning to refer to something by a word that is similar to another word comes with it. Similarly, to what is indicated in this verse:
{وَيَمْكُرُونَ وَيَمْكُرُ اللَّهُ}
(But they plan, and Allah plans.) (Al-Anfal, from the verse: 30)
Allah (swt) definitely is neither cunning nor plotting, rather, He (swt) stops their deception and their plots.