code: public static void updateActorPosition(final Actor actor, final Stage stage,
              final Vector2 newScreenSizeInStageCoords) {
          if (actor != null && stage != null) {
              actor.setPosition(
                      (int) ((actor.getX() + actor.getWidth() / 2f) / stage.getWidth() * newScreenSizeInStageCoords.x
                              - actor.getWidth() / 2f),
                      (int) ((actor.getY() + actor.getHeight() / 2f) / stage.getHeight() * newScreenSizeInStageCoords.y
                              - actor.getHeight() / 2f));
          }
      }
docs: When called BEFORE resizing the stage, moves the actor to match the same aspect ratio as before. Useful for
  windows and dialogs in screen viewports.
  
  @param actor will be repositioned.
  @param stage has to be before resizing.
  @param newScreenSizeInStageCoords screen coords processed by stage.