A man was found sitting on a bench with his ex-partner despite being subject to a 10-year restraining order.