Pakatan Harapan would have lost the Tanjong Piai parliamentary by-election if polling had been held