Unfortunately the proposed solution does not work for Kanban Boards that use ranking anymore. When editing the filter as suggested the following error is shown and the ranking is disabled:
Ranking is disabled, as the Filter Query for this board is not ordered by ascending Rank. Please check your filter configuration.
Jira internally relies on the rank field for drag-and-drop. The relative positions of issues are stored in this field. So if you change the order-by clause in the filter query to anything other than Rank, D&D stops working. Unfortunately, there is no way around that in Jira out of the box.
A possible solution is to use a plugin that works with the rank field. Our company (COGNITIFF) developed a plugin to address precisely this problem - Sort by any Field. The plugin will update the rank based on a rule that you define. You can take a look if that solves your problem.