One should ideally not set the alarm on their phone as an alarm for Shabbos (Setting on Shabbos is certainly forbidden but even setting it before Shabbos to ring on Shabbos is frowned upon.)
If one’s phone’s alarm is going off or if there are calls coming in that are disruptive, moving the phone out of the room is permitted. This is because a utensil that is designated for forbidden use may be moved if one needs the place it is in. In this application, it is not the physical place that it is in, but the impact of the item in its current physical place is needed (ie a quiet room not disrupted by the noise of the phone) and it therefore may be moved. Ideally, one should not move it too far from where it currently is as one may cause the bars on the screen to change by moving too far.