In a 6-quart Instant Pot, press the sauté button set to “normal” or “medium”. Add oil and the white and light green parts of the scallions, garlic, and ¼ teaspoon salt. Cook until softened, about 2 minutes, stirring often to prevent burning. Press “cancel”.
Add in the water, chicken, sweet potatoes, ginger, lemongrass, fish sauce, red pepper flakes (if using), and remaining 1 teaspoon salt. Stir to combine, making sure the ginger, lemongrass, and chicken are submerged.
Cover with the lid, set the valve to “sealing” and pressure cook on high for 12 minutes (it will take about 16 minutes to come to pressure). Once the timer goes off, let it naturally release for 10 minutes, then manually release the rest of the pressure.
Remove the lid. Transfer the chicken to a cutting board to cool off. Discard the ginger chunks and lemongrass. Once the chicken is cool enough to handle, use your hands to remove skin and use a fork to shred up the meat. Stir the chicken back into the pot along with the greens and lime juice.
Serve topped with coconut flakes (if using), the dark green parts of the scallions, and a fresh squeeze of lime.