
There was such an initial bombardment of questions almost as if at a void that it's difficult to keep a sound train of thought, but let's try
Firstly, the message was revealed to the final messenger pbuh and clear signs were granted, logical arguments were provided, many slowly began to accept the call, and after the initial incredulity of those in leadership positions, a blind hatred began to surface, Allah did indeed tell His messenger to continue to proclaim the message peacefully and Allah does indeed know the unseen, therefore a rational understanding can be that Allah was allowing things to progress quite naturally without too much interference on His part depite the open injustices that had become prevalent, such as murdering of babies, usurping the rights and property of the orphans and the weak, and a regressive decadence beneath the surface , plus much more.
When Allah was commanding His messenger and the believers to restrain themselves despite the injustice (the martyrdom (murder) of sumayyah (ra) is a perfect example since she was murdered for her testimony that there is no god but God, she wasn't a "militant" and neither were the rest of the believers), He was firstly proving the word against the unbelievers, and also creating a supressed will to respond within the steadily increasing community of believers and also ensuring that the first phase was focused on persevering and patiently rationalizing the status quo within their minds, it was an internal building up phase, and not a contradiction. The fact that some of their children from amongst the nobility of Quraish also migrated to Abissinya (along with the poor and weak) due to the persecution is a statement in itself since it indicates that the persecution was psychological as well as physical, since the daughter of Abu Sufyaan, Ja'far ibn Abi Taalib, 'Uthmaan ibn 'Affaan etc had tribal protection from physical abuse in Makkah. Also the fact that they were pursued to Abissinya and arrested and brought before An-Najaashi after his courtiers had been bribed and he had been presented with "gifts", proved a point to those who cared and/or care to observe. The families from among the nobility and the poor of Quraish which was known for it's ascendancy, freedom to practice one's chosen faith in Makkah, and generous hospitality to visitors were leaving due to fear of injustice, oppression and "islamophobia" and were still being harassed. (Does that still happen i wonder, i mean who would leave Britain to which all people of the world want to come - and immigrate to poor dusty Syria? And why?)
Anyway, by the time they arrived in Al-Madeenah, they already knew that they had their work cut out for them and that they needed to establish governance in order for the community to live in peace as Muslims (submitted to Allah) and to have their differences settled in accordance with the law of Allah (judiciary), this also was a stage in a long train of events, they did indeed establish governance and made mutual treaties with surrounding tribes and people from other walks of life, the Quraysh continued their persecution of those who remained behind or continued to accept Islam in Makkah and confiscated the properties of the weaker families of those who had migrated to Al-Madeenah, this opened up the opportunity of the Prophet pbuh to lie in wait for their caravans en-route to the trading venues of summer and winter to the north and south, make Quraysh reflect upon and regret their injustice, and enrich the Islamic state in the process.
By this time the Kafir leadership in Makkah was reaping the fruits of it's injustice, the Islamic state was steadily progressing and making alliances with surrounding tribes and was now known as a force to be reckoned with and not as a bunch of eccentric foolish hippies self-exiled to a commune, or as a bunch of rabble that could be trampled at will.
The previously prestigious leadership of Maakah was feeling humiliated and was also economically declining and that humiliation was cemented at their defeat at Badr, they avenged at Uhud, but then failed to realise the destruction of the Islamic state at Al-Khandaq when they gathered a mercenary coalition and made the Muslims famous throughout Arabia and the lands surrounding the peninsula. The jealousy and betrayal of theJews also became manifest and the nature of alliances also changed and became more way of life based.
the Prophet pbuh was around this time commanded to fight against surrounding tribes if they gave nothing more than an assurance to withold their hands from the believers, (with us or with the unbelievers), by the end, after the incessant betrayals and plots, the only ones that could be considered allowed to reside with Muslims safely were people who adhered to the books previously revealed, and after they paid the jizya in humility (this worked as protection and also made them more conducive to submitting to God completely and enjoying status with the believers in this world and in eternity).
The Prophet pbuh was by now commanded to fight pagans around him and to show harshness, so they knew well that there was no friendship between faith and infidelity and no safety until they submitted to God or moved far away from the believers.
When a mushriq who had refused to submit to God saw a believer, he either submitted before the Muslim was enriched, or ran for his life, or ws captured and ransomed, or was sent to meet his Lord.
So you can see that all this was happening in steady progress and while giving everyone the chance to observe and think deeply, and so nobody had a dispute against Allah, nor did the believers feel forced or pressured by Allah to get up and set things right. It was natural and just - unlike the false flag of 9/11 and succeeding manufactured pretexts and fake excuses to invade other people's lands in injustice and transgression.
It is kufr to resist an invasion of one's land if the reason for invasion is to establish the laws of God as enshrined in Quran and Sunnah, but it is lawful and sometimes a duty to resist if such an invasion is for the sake of kufr of Allah and greed. America lost it's dispute against Allah when it unlawfully invaded Iraq and called those who fought against such falsehood, injustice and oppression "insurgents" and called those who stood up in the west and called them liars "etremist sympathisers".
Think, it's not a contradiction by Allah but a presentation and a progressive upliftment of humanity.
Regarding friendship, you will not find people who believe in God and the last day loving those who commit infidelity to God, vibes wear off, al mar-u ma'a man ahab.
You will be with those whom you love.
But then there is productive friendship out of goodwill and a desire to do good, that's when you save them from hellfire and make them brothers and sisters in faith, but such is not achieved by concealing the guidance of Allah and feeling ashamed at His wisdom and guidance, just for the selfish natural tendency in-built in humans to be liked.
Wisdom and discretion is required whilst seeking the good pleasure of Allah in every situation so one needs to evaluate to the best of one's ability whilst ensuring that they are not angering Allah.
Those verses which were abrogated or superceded for the Islamic State are not all abrogrogated for everyone in every situation, because we find ourselves in many of those situations at different times and places.
Think.