Rinse rice in cold water until water runs nearly clear. Soak for 1 hour and then drain well.
Preheat oven to 400 degrees.
Place the rice into a metal 8-inch square pan and add pandan or lime leaves, if desired.
In a medium saucepan over high heat, bring coconut milk, water, sugar and salt to a boil. Pour coconut milk mixture over rice and stir to spread rice evenly. Cover with foil. Do this quickly to minimize heat loss.
Place pan in the oven and bake for 40 minutes.
Remove pan from oven. Check to see that all the liquid has been absorbed by tilting the pan.
Keeping the rice covered, let it rest for 15 minutes.
Remove the rice to a large serving dish and fluff with a fork or spatula.
Garnish with some toasted, shredded coconut, if desired.