The ‘Riverdale’ star says she struggled with the eating disorder in 2022