Hello @Var ,
>can we directly apply this patch on top of GDR update? or should we rollback SQL Server 2017 RTM CU(KB4583457) GDR and then apply CU23.
You can directly apply CU23.
I tested this situation in my environment and came to the conclusion that we can directly apply CU23 for the instance of SQL Server 2017(RTM-CU22-GDR) (KB4583457) without uninstalling the security update for SQL Server 2017 CU22 ( KB4583457).