It depends on many things that you do not know.
The main one would be at which stage of planning are future layoffs. From your post it seems that it is still quite vague, but maybe Management has planned for it but they are not talking about it for obvious reasons.
If the persons making/approving the transfer offer know of the plans, I would count it as safe. There is no sense covering a position that you are going to remove, to train you and become a burden for the team for some weeks while you get the git of it to later fire you. It would be a "safe-ish" position, while your current one would be uncertain.
If the persons making/approving the transfer offer do not know the plans, they may find later that they have to downsize the team, and obviously being the less experienced member puts you at a disavantage (although it is not necessarily the only factor in play).
The possibility of moving back to your previous position may exist or may not, the other team may find themselves also forced to downsize (or at least, to not replace you).
If the persons making/approving the transfer offer know of the plans, I would count it as safe. There is no sense covering a position that you are going to remove, to train you and become a burden for the team for some weeks while you get the git of it to later fire you. It would be a "safe-ish" position, while your current one would be uncertain.
If the persons making/approving the transfer offer do not know the plans, they may find later that they have to downsize the team, and obviously being the less experienced member puts you at a disavantage (although it is not necessarily the only factor in play).
The possibility of moving back to your previous position is dubious. A manager will be very tempted to decide that since replacing you will mean the work and cost and finding a replacement, they can save that by just removing the unoccupied position, which also has the advantage that it does not cause the costs (severance package, bad morale) related to actually firing someone.
At a time of layoffs, this is a very tempting situation, you would be in fact signaling that the position might be worth removing.
Of course, if you are highly valued in your original team that could help in that they try to get you back, or at least that they put a good word for you to help you land in some other team.
Other factors which you will probably will not be able to know is management's view of those teams/projects: which is seen as more important to the business, which is seen as less efficient/bloated, commitments to deliver results for each project, market perpectives...