Heat the oil in an Instant Pot set to the "saute" function set to "normal". Add the mustard seeds and when they begin to sputter, add the onions, curry leaves, ginger and garlic. (If making this oil-free, add the mustard seeds to the dry IP liner after it heats up, then, when they sputter, add the onions, ginger and garlic and then add in 1/4 cup water)
Saute, stirring frequently, until the onions soften and just start to brown. Add the tomatoes, turmeric, coriander powder and red pepper flakes and mix well. You can use an Instant Pot glass lid or any glass lid that fits to cover the pot at this time and let the tomatoes cook 3-4 minutes until they are broken down and very pulpy. Stir a couple of times during cooking.
Add the dal to the pot and stir to mix, then add in 4 cups water. Give everything a good stir then click in the Instant Pot lid. Set the IP at manual pressure for 10 minutes.
After cooking, wait either until pressure releases automatically, or, if you're in a rush, wait 10 minutes after the end of cooking, then carefully quick-release according to instructions.
Using a ladle, stir in the coconut milk and salt to taste. At this point you can garnish with more cilantro, if you like, or serve as is. Always top the dal with a final squeeze of lemon juice for the perfect finish!