There are many threads on this in various forums. Just just “cross-commission” in Sesrch.
The key to cross-commissioning is the losing service can afford to lose you, and the gaining service has to want you and has the room to take you. The numbers of officers in each paygrade are controlled by law. You could be the greatest candidate in the world, but if the Marine Corps doesn’t need an extra body, you’ll be turned down. The Marines fill their O-1 pipeline from USNA, NROTC Marine Option and OCS and a few other programs. Since they are a smaller service, that means they have less margin to accept others from outside the usual programs.
The AF has likely invested dollars in you. Its ROI is the specified period of obligated service from you.
This is not to say it can’t be done. There will be regulations and policies you can research in Air Force directives that will tell you how and when. The planets, moons and stars must align just so. Since it all depends on the needs of the AF/USMC, polices and XC skit availability can change every year.