Judge referenced Sheeran’s precedent-setting 2023 victory over his song ‘Thinking Out Loud’, which was accused of plagiarising a track by Marvin Gaye