I think you might be confusing diplomatic immunity with sovereignty.  Diplomatic immunity is only granted to diplomats on a mutually agreeable basis, not anyone who steps into an embassy. The group of 15 alleged perpetrators are not Saudi diplomats with presented credentials, so in no way does it mean that Turkey cannot investigate, arrest or prosecute them. Of course as a matter of practice once these perpetrators have escaped back to Saudi Arabia, there is no practical way to enforce.
Another thing is embassy and consulates enjoy inviolability, but that piece of property itself is still within the sovereign rights of its host nation. What this means is that Turkey cannot barge into the consulate without expressed permission of the Saudis, but once granted all investigations and prosecutions follow Turkish law, not Saudi ones as the crime was committed in Turkey technically.
A case in point would be Wikileaks founder Julian Assange. The guy is able to hole up in Ecuador embassy precisely because of the inviolable principle as the UK police cannot enter the premise without Ecuador permission, but this is very different from the common misconception that the UK police cannot arrest Assange because he is staying in Ecuador lands and British laws do not apply to that building.
Many countries conflate these concepts whenever it suits their own national interests, so it is quite frequent to hear claims about sovereignty being violated whenever something bad happens to an embassy or its personnel.
		
		
	 
https://www.state.gov/discoverdiplomacy/diplomacy101/places/170537.htm
What is a U.S. Embassy?
    
        
                         
                
                      
		
		
	
	                     
                        Inside the U.S. Embassy in Pretoria, South Africa.
                         (© Elizabeth Gill Lui)                   
               
                 
                                    
                 
                                    
                 
                     An embassy is the headquarters for U.S. Government representatives serving in a foreign country.  It is normally led by an ambassador, who is the U.S. President’s representative to the host country. An embassy is normally located in the capital city.  It may have branches, known as consulates, in other cities.               
                 
                   
  U.S. embassies and consulates abroad, as well as foreign embassies and consulates in the United States, have a special status. While the host government is responsible for the security of U.S. diplomats and the area around an embassy, the embassy itself belongs to the country it represents. Representatives of the host country cannot enter an embassy without permission -- even to put out a fire -- and an attack on an embassy is considered an attack on the country it represents.               
                 
                                    
                 
                                    
                 
                     The ambassador, also known as the chief of mission, is the highest-ranking diplomat to the host country and is the personal representative of the President. He or she is comparable to a CEO of a corporation and has to be a strong leader and a good manager.  He or she is supported by a deputy, known as the deputy chief of mission, and a team of U.S. Foreign Service Officers and specialists from the Department of State.  He or she may also be supported by representatives from other U.S. agencies, such as the U.S. Agency for International Development, the Departments of Defense, Commerce, Justice, Homeland Security, and Agriculture, among others. No matter their agency, all employees work under the direction of the ambassador.                
                 
                                    
                 
                                    
                 
                     The primary purpose of an embassy is to assist American citizens who travel to or live in the host country. U.S. Foreign Service Officers also interview citizens of the host country who wish to travel to the United States for business, education, or tourism purposes.  Embassy staff interact with representatives of the host government, local businesses, nongovernmental organizations, the media and educational institutions, as well as private citizens to increase understanding of the United States and its policies and to collaborate on shared interests.  Embassy staff analyze the political and economic situation in the host country and report back to the Department of State on issues that affect the United States. They help U.S. businesses find partners and customers and may train the host government’s police and military to support better security in the country. They also sponsor educational, professional and cultural exchanges to introduce emerging and established leaders to the United States and to promote ties between U.S. and foreign students, academics, scientists, entrepreneurs, political, religious, and civil society figures.               
                 
                                    
                 
                                    
                 
                     While Americans work at embassies and consulates, most of the staff comes from the host country. These employees are essential to the success of any embassy because they know the local culture, have essential skills, or are well connected to government and civil society leaders.                 
           
                             
                  
                 
                    Inside the U.S. Ambassador's residence Bangkok, Thailand. (© Elizabeth Gill Lui)               
                 
                    A large embassy may have annexes. The main embassy building is called the chancery.  As the public face of the United States, it is often an architectural work of art. In some countries, American staff may live on the embassy compound, but they frequently live in apartments or houses in the host city. The ambassador’s residence is often used for official functions, and its public areas are often decorated with American art on loan from museums.                 
                  
 REad More