I would occasionally go-maybe once a month or so. It’s nice for kids to see their parents get along and it makes them feel happy that they can have a meal with both parents.
I hate my ex, but we are civil. While uncomfortable, we occasionally we will go out to dinner with our daughter. She actually recently asked if we could do it again soon because she enjoyed being able to be with both of us together. She knows there’s no chance of us getting back together. I think as long as that’s clear to your child, what’s the harm in making your child happy!