You’ve forgotten to set all of the argument and return types, so your pointer values are getting truncated to 32-bit integers:
liblr.RenderFunc.restype = ctypes.c_void_p
liblr.RenderFunc.argtypes = [ctypes.c_void_p]
liblr.Render.restype = ctypes.c_void_p
liblr.Render.argtypes = [ctypes.c_void_p]
Without this change, it only works if the pointer values just so happen to have all-zeroes in the higher 32 bits.