Google Apps Script doesn't support the cursor and its position in Google Sheets. It does have such support in Google Docs, however:
const ss = SpreadsheetApp.getActiveSpreadsheet();
const rangePosition = PropertiesService.getUserProperties().getProperty('lastEditPosition');
rangePosition = JSON.parse(rangePosition);
ss.setActiveSheet(ss.getSheetByName(rangePosition.lastEditSheet));
ss.setActiveRange(ss.getRange(rangePosition.lastEditRange));
const sheet = range.getSheet();
PropertiesService.getUserProperties().setProperty('lastEditPosition', JSON.stringify({
lastEditSheet: sheet.getName(),
lastEditRange: e.range.getA1Notation(),