I had the same issue a couple of months ago, even opened a ticket with the support but they couldn't reproduce the issue, so there was no solution.
What I needed to do when I was using 7.17 was to edit the Kibana startup script and put the setting directly on the script, the --max-old-space-size
was hardcoded in the startup script.