Turkey under the Kemalists is an example of a primarily Muslim nation at least attempting to build a liberal democracy.
Yes, building a liberal democracy by using military dictatorships. When you are trying to force something on people that dont want it(at least the majority), thats when you get Erdogan. It might suck for turks living in Western Turkey and in cities like Istanbul, Izmir and Ankara but the other half of turks have a majority.
And one of the fundamental principles of a democracy is that majority rules. You cant use the military to overthrow democratically elected governments just because you dont like their policy.
However, i agree with your point, there are plenty of turks who selfidentity as muslim and are ok with lgbtq, etc, just like there are christians. Though i never understood how that works. Like how can the Church of Sweden participate in Pride parades. At what point something stops being christianity and becomes a social club? In the Bible is clearly says that homosexuality is bad.