First have a look at the entire history of Tests involving Pakistan at neutral venues:
The 1999 match was part of the Asian Test championship which had the final played in Bangladesh, which was not a Test country at that time.
Apart from 9/11, an attack near the hotel where NZ’s team was staying in Karachi in early 2002 resulted in matches being moved out of the country. This began with a 3-Test series against Aus (with the first Test at Colombo and the next two at Sharjah). Australia won this 3-0.
After this, serious cricket returned to Pakistan for some years before the Lahore incident involving the SL team in Lahore in 2009 made it the last Test to be played in Pakistan.
Here are the matches played IN Pakistan since 1999:
In this period Pakistan lost 2-1 to Sri Lanka in 2000, 1-0 to England later in 2000, 2-1 to India in 2004, and 1-0 to SA in 2007 before the end came in early 2009. The UAE become Pakistan’s adopted home from 2010 onwards, after one neutral series against Australia in England.
Although some series were drawn, Pakistan did record a 3-0 victory against England in 2012, and a 2-0 victory against Australia in 2014. While they beat WI 2-1 in late 2016, they lost 2-0 to Sri Lanka in the just concluded series. This involved their first loss at Abu Dhabi, and the first series loss in the UAE since 2010. And their last 3 Tests in the UAE have resulted in successive losses at Sharjah, Abu Dhabi and Dubai.
Certain venues like Bridgetown and Karachi were regarded as “fortresses” where visiting teams hardly ever won there. There are even such fortresses in domestic cricket including the IPL.
But the UAE may not be a fortress any more-which resulted in Pakistan moving from 1 to 7 in the rankings quite rapidly.