I have a work permit for Germany but the project assignment is complete in Feb 2019 and now will begin again in April 2019, As my family stays here in Germany Can I come back in Germany and work as remote or offshore not claiming any allowance
What does your work visa say? Are you allowed to work between February and April?
If you have a valid visa you can come back any time. If you have a valid permission to work you can work any time.
Please note that should you work remote or for an offshore company, while you may get paid by a non-German company, that still means you have to pay taxes on it in Germany. Although that company may already (have to) pay taxes for you in the country that they reside in. There are double taxation treaties, but you will have to check them out to make sure you are not taxed twice on that money. And you will need to pay your own health insurance in full. I say in full because in Germany the employer pays half of it by law. If your employer is not a German (or European) company, you may need to pay your full health insurance by yourself, your half and the half that the employer normally pays. You need to navigate those laws carefully, all of those authorities are understanding and willing to explain, but you need to make sure that you don't end up with a lot less money made than you thought it would be.