Hi Rahul
Removing the permission to View block is the correct way to hide the block from a role for a course.
There doesn't appear to be a permission to view a block for a higher level.
I tried adding the block to the front page and deleting the learner permission to view
I then chose for the block to appear throughout the site but the block showed to the learner role. I was hoping this block to be duplicated throughout the site including the same permissions)
I can't think of another way to do this but there possibly could be.
Regards