Airports have procedures in place for cases like this (because this can happen in legitimate situations), but they usually don’t like it and may give you a hard time, and likewise for immigration authorities.
Note that in some cases if they find out this was intentional they may even fine you (this happened to a guy in Singapore who wanted to be with his partner as long as possible). Also if you use a physical check-in desk you may get flagged as it would be quite unusual for a long haul passenger to have no checked luggage and no significant hand luggage (think roll aboard) either.
I don’t see why you would need to go right up to the gate. Ideally don’t check-in at all. Otherwise, some airlines allow to cancel online check-in right in their app.
If not, you can advise them at a check-in, service or sales desk (if there’s one still open for that airline, which depends on which one it is) or your friends can tell them at the gate. In that last case they won’t cancel the check-in just in their word but they will probably mark you as no show quickly once boarding is finished (especially as you have no checked luggage).
Note that all this still does not guarantee that your seat will be available for your friends: if there are overbooked/waiting list passengers, they’ll give them your seat as soon as regular boarding has ended.
If there’s no overbooking and you don’t check-in at all, have them pick two seats with a free seat in between (e.g. aisle and window on a 3-4-3 or 3-3-3 layout), as far back as possible, this gives them the best chance to keep the seat free.