I agree that a baggy to seal the controller inside, and spray it with ant spray before sealing it up. The spray will not harm the controller, but will kill any ants that eat through the baggy material. Or spray the outside of the baggy, once the controller is safely inside. The small gap for the wires to go in and out can be covered with duct tape, and the ants can not get past it.
AliExpress.com Do a search for 10 amp PWM solar controller. You should find many, and the $13 one that I bought works fine with a pair of 45 watt solar panels.
Fred.