The emperor's birthday is a national holiday. If the emperor dies, the government has the option to either cancel that holiday (and introduce a new holiday for the birthday of his successor), continue the holiday for one year (perhaps as a day of mourning) or maintain the holiday (perhaps renaming it).
For example, the Showa Emperor's birthday (Hirohito) was on April 29th. This made a nice group of holidays in late April and early May. After he died, the day was maintained as a national holiday but renamed "Greenery Day" and later "Showa Day".
On the other hand, when the Heisei Emperor (Akihito) abdicated, the government chose not to maintain his birthday (23 Dec) as a national holiday. The 23rd of Dec is now a regular working day for Japanese workers.
In general (in Malaysia or Thailand) if the King dies, then the new King comes to the throne, and it is his birthday that is celebrated. However each sovereign country is entire free to have a holiday on any day for any reason or for no reason at all.