Will Allah forgive a Muslim. If he/she committed major/minor shirk unknowingly and dies without repentance of that shirk?
A Muslims is expected to study and learn more about his religion.
In Sunan Abu Dawud 3636, Abu Hurairah reported the Prophet (ﷺ) as saying:
If anyone pursues a path in search of knowledge, Allah will thereby make easy for him a path to paradise; and he who is made slow by his actions will not be speeded by his genealogy.
Shirk is a major sin in Islam and an affront to Allah's mercy (swt). You would expect a Muslim to know what is and what isn't shirk before he reaches an age or condition near the hour of death. Whenever we commit sins, big or small, intentional or unintentional, we should ask Allah (swt) for His forgiveness.
As for Muslims who have died without repenting unintentional shirk, let us simply pray for them that Allah (swt) pardons them because of their ignorance. I am under the opinion that Allah (swt) would forgive Muslims who are sincerely repentant on their deathbeds regardless if they have committed sins intentionally or otherwise.
In Surah Az-Zumar 39:53, it was revealed:
۞ قُلْ يَا عِبَادِيَ الَّذِينَ أَسْرَفُوا عَلَىٰ أَنْفُسِهِمْ لَا تَقْنَطُوا مِنْ رَحْمَةِ اللَّهِ ۚ إِنَّ اللَّهَ يَغْفِرُ الذُّنُوبَ جَمِيعًا ۚ إِنَّهُ هُوَ الْغَفُورُ الرَّحِيمُ
Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful."
Allah knows best.