I say, "Allah only does things that befit His Majesty and Wisdom." Now if someone comes up to me and says, "Allah can do anything! Are you denying that He can do anything?" and I deny him saying, "Allah will not do anything which makes Him not be Who He is." , am I guilty for shirk?
All Praise to Allah Subhanahu wa Taala and blessings of Him be on Prophet Muhammad peace be upon him His family and companions
If you mean that His divinity is without any flaws and imperfections so despite the fact being powerful and possible for him to do any thing he would not do anything which is not suitable according to his majesty is completely acceptable and it comes under "Muhaal",so this could not be considered as a shirk in such scenario.
Allah is Free from anything which is Muhaal (absolutely impossible). It cannot be connected to His Qudrat because Muhaal (absolutely impossible) refers to that which can never exist. If it were to be regarded as Maqdoor, i.e. within His Divine Power, then there would be a possibility of it existing and it would no longer be regarded as something which is Muhaal. It can be better understood through this, that another Allah is Muhaal, meaning that another Allah can never exist. If this were within the Divine Power of Allah, then it would be regarded as something that can come into existence, and would thus no longer be regarded as Muhaal not to believe that it is Muhaal (for another Allah to exist), is to reject the Wahdaniyat (Oneness) of Allah. Similarly, the destruction of Allah is Muhaal, if it were to be within His Divine Power then it would have been regarded as being a possibility, one who can come to an end can never be Allah. It has thus been proven that to believe that a Muhaal is within the Divine Power of Allah, is to reject the Divine Oneness of Allah.(Taken from Bahare Shariat)
Had there been therein (in the heavens and the earth) gods besides Allah, then verily both would have been ruined. Glorified be Allah, the Lord of the Throne, (High is He) above what they attribute to Him!(21:22)
Allah swt and His Messenger knows best.