Who was Qadi Al-Baydhaawi? A sufi quoted him as having said: "Anyone who builds a mosque near the grave of an upright person or prays in the tomb or intends to ask for help through the spirit of that upright person ... If he does all that without the intention of glorifying him or doing Tawajuh towards him (in prayer), then there is nothing wrong in that." [Mirqat, Sharh al Mishqaat, Volume No. 2, Page No. 202] According to him, Al-Baydhaawi and Mullah Ali Qaari are Sufis, as they both believed in asking through the soul of the dead.
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad is His slave and Messenger.
There are many texts that forbid building mosques on graves and performing prayer at them; and the leading Muslim scholars acted upon those texts.
Ibn Taymiyyah said:
"As for graves and the like, the leading Muslim scholars agreed that it is not from the religion of Islam to particularly pray or supplicate or otherwise at these graves, and whoever believes that prayer or supplication or Thikr at these graves is better than in mosques, then he has committed Kufr (gone out of the fold of Islam). Rather, there are many texts from the Sunnah that are confirmed by Tawaatur (conveyed by narrators so numerous that it is not conceivable that they have agreed upon an untruth thus being accepted as unquestionable in its veracity) about the forbiddance of taking the graves as mosques. It is confirmed that the Prophet said, 'May Allah curse the Jews and the Christians; they took the graves of their Prophets as places of worship.' This is a clear warning against what they did. ‘Aa’ishah said, 'Had it not been for that, his (the Prophet's) grave would have been prominent, but he (the Prophet disliked that it might be taken as a place of worship (mosque, even before it had come to existence).' [Al-Bukhaari and Muslim]
Also, it was reported that a church in Abyssinia was mentioned to the Prophet and how it had beauty and icons, so he said, 'Those are a people whom when a righteous man died among them, they would build a place of worship over his grave and put those icons in it. They are the most evil of mankind before Allah on the Day of Judgment.' [Al-Bukhaari and Muslim]
It was also reported that Jundub narrated that the Prophet said five days before he passed away, 'Those who came before you took the graves as places of worship. Do not take graves as places of worship, for I forbid you from doing that.' [Muslim]
Imaam Ahmad also reported that the Prophet said, 'Among the most evil of people are those upon whom the Hour will come when they are still alive, and those who take graves as places of worship.'
It is also reported in Muwatta’ Maalik that the Prophet said, 'O Allah, do not turn my grave into a worshiped idol; Allah is extremely angry with a people who took the graves of their Prophets as places of worship.'
The Prophet said, 'Do not turn my grave into a place of celebration, and send your blessings upon me wherever you are, as your salutations reach me.'"
Ibn Taymiyyah also said:
"As regards other innovations, then there are some matters among which is the prayer at the graves in general, taking them as places of worship, and building mosques on them. There are texts from the Prophet proven with Tawaatur about the forbiddance of doing so, and there is a severe threat about it. With regard to building mosques on graves, then all scholars of the different schools declared that this is forbidden in conformity with the ahaadeeth. The scholars of our (Hanbali) school and others from the School of Maalik and Ash-Shaafiʻi and others stated that it is prohibited, and some scholars stated that it is disliked; so does this dislike indicate prohibition or only dislike? There is no doubt that it decisively indicates prohibition."
It is obligatory on a Muslim to hold very tightly to what has been proven in the texts of revelation from the Quran and the Sunnah. As regards the Ijtihaad (independent reasoning) of the scholars and their opinions that contradict the sound texts, then they are rejected, regardless of who said them, while seeking excuses for the scholars, thinking good of them, and respecting their position, and this is part of the obligations of the religion and its principles. For more benefit, please refer to fatwa 85732.
As regards Al-Baydhaawi, then his biography as in the books of Tafseer (Quran exegesis) says that he is Naasir Ad-Deen abu Al-Khayr, ʻAbdullah ibn ʻUmar ibn Muhammad ibn ʻAli, Al-Baydhaawi Ash-Shaafiʻi, who is from Persia.
Ibn Qaadhi Shuhbah said in his Tabaqaat, "He is the author of many works, the scholar from Azerbaijan, and the Shaykh of that region." As-Subki said, "He was an outstanding Imaam, kind, well-spoken, righteous, and a devout worshiper."
Ibn Habeeb said: "Each of the Imaams spoke with praise about his works; were he to have had no other work than Al-Minhaaj Al-Wajeez, then it would have been sufficient for him. He acted as a judge in Shiraz and died in Tabriz; As-Subki and Al-Isnawi said that he died in 691 A.H; Ibn Katheer and others said: He died in 685 AH. The most important of his works are: Al-Minhaaj, and its explanation in the fundamentals of Fiqh; At-Tawaaliʻ, in the principles of religion; and Anwaar At-Tanzeel wa Asraar At-Ta’weel in Tafseer. These three books are the most famous and most widely circulated among the scholars."
As for his Sufism, we did not come across its mention in his biography. Even in the thesis written about him entitled: Al-Baydhaawi wa Aaraaʻihi Al-Iʻtiqaadiyyah – ʻArdh wa Naqd min Khilaal Tafseerih (meaning: Al-Baydhaawi and his Creed-related Opinions – Presentation and Critique in light of his Tafseer); then its author did not mention anything about his Sufism.
As regards Mullah Ali Qaari, then the author of the book entitled Al-Bidhaaʻah Al-Muzjaah liman yutaaliʻ Al-Mirqaah said about him, "He adopted the methodology of the 'Aliyyah Naqshabandiyyah, Qaadiriyyah, and Jishtiyyah from the Shaykhs of his era; he kept company with them and he strove to serve them earnestly."
As for your saying: (they both believed in asking through the soul of the dead), then the text which you quoted does not indicate that.
Allah knows best.
You can search for fatwa through many choices