I’m not sure I understand your situation, but my first thought is that it’s not about file permissions but folder permissions.
What happens when you try to save it to a different location, or even another volume (thumb drive) ?
Best practice is NOT to save directly to any Keyboard Layouts folder where the System can access your keyboard layout.
Instead, create a "studio" folder where you keep notes, different versions, etc. and save it there.
Then use Ukelele’s Organiser to install your keyboard layout in the appropriate Library>Keyboard Layouts> location.