In a sauce pan over medium heat, allow the butter to melt, then add the flour and whisk together. Cook for 2-3 minutes. Pour in the milk and whisk until smooth.
Layer the potatoes in a dish that fits inside your Instant Pot. Sprinkle on ⅓ of the shredded cheese. Pour on ⅓ of the sauce. Repeat with 2 more layers.
Place the trivet in the Instant Pot. Pour in 1 cup of water. Set the potato dish on the trivet. Lock the lid and set the vent to sealing.
Press the Pressure Cook button and set the time to 30 minutes. When the time is up, naturally release pressure for 5-10 minutes, then release the remaining pressure.
Allow the dish to sit for at least 5 minutes to firm up before serving.