A new drug treatment could help protect people with diabetes from sight loss, a study has suggested.