They can, but it's still a process and not as easy as saying to a prospective employer "I have an H1B that is valid until October 2025, you don't have to do anything". Further, even though it's rarer, I believe that the transfer can still be denied if USCIS decides the new position doesn't qualify.